fixing missing deletion of wrong-md5 partial file

This commit is contained in:
2015-06-16 13:26:52 +03:00
parent d1134f640c
commit 2d9ad804bb

View File

@@ -180,6 +180,8 @@ for ((i = 0; i < ${#SMALLNAME[*]}; i++)); do
elif [ -e $SMALLPATH ] && [ $(du $SMALLPATH | awk -F" " '{ print $1 }') == $SMALLSIZE ] && [ $(md5sum $SMALLPATH | awk -F" " '{ print $1 }') != $SMALLMD5 ]; then elif [ -e $SMALLPATH ] && [ $(du $SMALLPATH | awk -F" " '{ print $1 }') == $SMALLSIZE ] && [ $(md5sum $SMALLPATH | awk -F" " '{ print $1 }') != $SMALLMD5 ]; then
echo "[ERROR] MD5 is different but file has same size." echo "[ERROR] MD5 is different but file has same size."
echo "[INFO] Deleting file and starting new download." echo "[INFO] Deleting file and starting new download."
checkwait
rm $SMALLPATH
wget -O $SMALLPATH $SMALLURL wget -O $SMALLPATH $SMALLURL
# File already exists, has correct size, and has correct MD5 # File already exists, has correct size, and has correct MD5