# HG changeset patch # User Christophe Lincoln # Date 1487269347 -3600 # Node ID c6b5c649a7a3e2a2ded159224c0a3d4d23888861 # Parent bda034569b7fc3e1e44d07c46f562b854c014c86 libspk.sh: exit downlaod if sum dont match diff -r bda034569b7f -r c6b5c649a7a3 lib/libspk.sh --- a/lib/libspk.sh Sun Mar 22 15:21:21 2015 +0100 +++ b/lib/libspk.sh Thu Feb 16 19:22:27 2017 +0100 @@ -149,7 +149,9 @@ debug "mirror $SUM : $msum" debug "local $SUM : $sum" if [ "$sum" != "$msum" ]; then - rm -f $file && download "$file" $mirror + gettext "ERROR: Checking:"; colorize 31 " ${CHECKSUM} $(basename $file)" + rm -f $file #&& download "$file" $mirror + newline && exit 1 fi } @@ -201,7 +203,7 @@ # Be sure the file was fetched. if [ ! -f "$CACHE_DIR/$file" ] && [ ! -f "$pwd/$file" ]; then gettext "ERROR: Missing file:"; colorize 31 " $CACHE_DIR/$file" - newline && exit 1 + newline && return 1 fi }