1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-11-15 22:05:00 -05:00

Abort if expected SHA1 hash is unkown

This commit is contained in:
Reinhard Pointner 2016-07-08 17:39:05 +08:00
parent fe7e892e6a
commit 1396a7476d

View File

@ -30,6 +30,11 @@ JAR_URL="https://sourceforge.net/projects/filebot/files/filebot/HEAD/FileBot.jar
JAR_SHA1_EXPECTED=`curl --retry 5 "$JAR_URL/list" | egrep -o "[a-z0-9]{40}"` JAR_SHA1_EXPECTED=`curl --retry 5 "$JAR_URL/list" | egrep -o "[a-z0-9]{40}"`
JAR_SHA1=`sha1sum $JAR_FILE | cut -d' ' -f1` JAR_SHA1=`sha1sum $JAR_FILE | cut -d' ' -f1`
if [ -z "$JAR_SHA1_EXPECTED" ]; then
echo "SHA1 hash unknown"
exit 1
fi
if [ "$JAR_SHA1" == "$JAR_SHA1_EXPECTED" ]; then if [ "$JAR_SHA1" == "$JAR_SHA1_EXPECTED" ]; then
echo "$JAR_FILE [SHA1: $JAR_SHA1]" echo "$JAR_FILE [SHA1: $JAR_SHA1]"
exit 0 exit 0