mksrcarc.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. set -e
  3. # These are text files.
  4. text=`{ find . -name CVS -prune -o \
  5. -name .cvsignore -prune -o \
  6. -name .svn -prune -o \
  7. -name .git -prune -o \
  8. -name LATEST.VER -prune -o \
  9. -name CHECKLST.txt -prune -o \
  10. -name mksrcarc.sh -prune -o \
  11. -name '*.chm' -prune -o \
  12. -name '*.cur' -prune -o \
  13. -type f -print | sed 's/^\.\///'; } | \
  14. grep -ivE 'test/.*\.txt|MODULE|website.url' | grep -vF .ico | grep -vF .icns`
  15. # These are files which I'm _sure_ should be treated as text, but
  16. # which zip might complain about, so we direct its moans to
  17. # /dev/null! Apparently its heuristics are doubtful of UTF-8 text
  18. # files.
  19. bintext=test/*.txt
  20. # These are actual binary files which we don't want transforming.
  21. bin=`{ ls -1 windows/*.ico windows/website.url; \
  22. find . -name '*.chm' -print -o -name '*.cur' -print; }`
  23. verbosely() {
  24. echo "$@"
  25. "$@"
  26. }
  27. verbosely zip -l putty-src.zip $text
  28. verbosely zip -l putty-src.zip $bintext
  29. verbosely zip putty-src.zip $bin