From c1851403c264e64396d3b06849f47b40a95b3571 Mon Sep 17 00:00:00 2001 From: "xu.jimmy.wrk" Date: Thu, 25 Mar 2010 17:25:44 +0000 Subject: [PATCH] Prevent non-ASCII list from being submitted, which makes wrong checksum --- sendGFWList.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sendGFWList.sh b/sendGFWList.sh index 018d3e8..4f140eb 100755 --- a/sendGFWList.sh +++ b/sendGFWList.sh @@ -88,6 +88,9 @@ if [ "$*" == "" ]; then exit 1; fi +# make sure the list doesn't contain unicode chars +file list.txt | grep ASCII 1> /dev/null || (echo "List contains non-ASCII characters, please remove them." && exit 1) && + # update date and checksum sed -i s/"Last Modified:.*$"/"Last Modified: $(date -R -r list.txt)"/ list.txt && ./addChecksum.pl list.txt &&