Prevent non-ASCII list from being submitted, which makes wrong checksum

This commit is contained in:
xu.jimmy.wrk 2010-03-25 17:25:44 +00:00
parent 5d37adda3c
commit c1851403c2

View File

@ -88,6 +88,9 @@ if [ "$*" == "" ]; then
exit 1; exit 1;
fi 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 # update date and checksum
sed -i s/"Last Modified:.*$"/"Last Modified: $(date -R -r list.txt)"/ list.txt && sed -i s/"Last Modified:.*$"/"Last Modified: $(date -R -r list.txt)"/ list.txt &&
./addChecksum.pl list.txt && ./addChecksum.pl list.txt &&