mirror of https://github.com/gfwlist/gfwlist
Prevent non-ASCII list from being submitted, which makes wrong checksum
parent
5d37adda3c
commit
c1851403c2
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue