diff --git a/src/datastore_mad/remotes/downloader.sh b/src/datastore_mad/remotes/downloader.sh index 3b095c01b6..8414c0bb23 100755 --- a/src/datastore_mad/remotes/downloader.sh +++ b/src/datastore_mad/remotes/downloader.sh @@ -61,10 +61,8 @@ function decompress # Function called to hash a stream. First parameter is the algorithm name. function hasher { - algo=$1 - - if [ -n "$algo" ]; then - openssl dgst -$algo | awk '{print $NF}' > $HASH_FILE + if [ -n "$1" ]; then + openssl dgst -$1 | awk '{print $NF}' > $HASH_FILE else # Needs something consuming stdin or the pipe will break cat >/dev/null