From 9ca4b2bbb6c41c7160fb76feb47b512e924838cf Mon Sep 17 00:00:00 2001 From: simon Date: Sat, 18 Dec 2004 10:00:27 +0000 Subject: [PATCH] zip apparently gives a warning (`-l used on binary file') when you use -l on a UTF-8 text file. Move potentially UTF-8 things (the new testdata files) into a new category of source files, and suppress zip's warning for that category. git-svn-id: svn://svn.tartarus.org/sgt/putty@5009 cda61777-01e9-0310-a592-d414129be87e --- mksrcarc.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mksrcarc.sh b/mksrcarc.sh index 10ca3ec2..f2e9845b 100755 --- a/mksrcarc.sh +++ b/mksrcarc.sh @@ -1,5 +1,6 @@ #!/bin/sh perl mkfiles.pl +# These are text files. text=`{ find . -name CVS -prune -o \ -name .cvsignore -prune -o \ -name .svn -prune -o \ @@ -9,8 +10,15 @@ text=`{ find . -name CVS -prune -o \ -name '*.dsp' -prune -o \ -name '*.dsw' -prune -o \ -type f -print | sed 's/^\.\///'; } | \ - grep -ivE MODULE\|putty.iss\|website.url | grep -vF .ico` + grep -ivE 'testdata/.*\.txt|MODULE|putty.iss|website.url' | grep -vF .ico` +# These are files which I'm _sure_ should be treated as text, but +# which zip might complain about, so we direct its moans to +# /dev/null! Apparently its heuristics are doubtful of UTF-8 text +# files. +bintext=testdata/*.txt +# These are actual binary files which we don't want transforming. bin=`{ ls -1 windows/*.ico windows/putty.iss windows/website.url; \ find . -name '*.dsp' -print -o -name '*.dsw' -print; }` zip -k -l putty-src.zip $text > /dev/null +zip -k -l putty-src.zip $bintext >& /dev/null zip -k putty-src.zip $bin > /dev/null -- 2.11.0