From 544a21de1cd024c7e8630768b1fb1eea5f9afb2b Mon Sep 17 00:00:00 2001 From: mxmehl Date: Wed, 24 Jun 2015 17:25:51 +0300 Subject: [PATCH] fixing wrong echo in function; fixing wrong variable when hash is wrong --- split-dl.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/split-dl.sh b/split-dl.sh index ba43081..1dd8c39 100755 --- a/split-dl.sh +++ b/split-dl.sh @@ -115,9 +115,9 @@ function compall { SIZE=$2 HASH=$3 if $(compdu $FILE $SIZE) && $(comphash $FILE $HASH); then - echo="true" + echo "true" else - echo="false" + echo "false" fi } @@ -332,7 +332,7 @@ until [ "$STATUS" == "F" ]; do fi # File already exists, has correct size, but has wrong hashsum - elif [ -e $SMALLPATH ] && $(compdu $SMALLPATH SMALLSIZE) && ! $(comphash $SMALLPATH $SMALLHASH); then + elif [ -e $SMALLPATH ] && $(compdu $SMALLPATH $SMALLSIZE) && ! $(comphash $SMALLPATH $SMALLHASH); then echo "[ERROR] Hashsum is different but file has same size." echo "[INFO] Deleting file and starting new download." checkwait