From 147b4b98a1a39d80b47fb130a70682e44d98fa2c Mon Sep 17 00:00:00 2001 From: mid-kid Date: Tue, 16 May 2017 15:41:11 +0200 Subject: [PATCH] Fix displaying checksum in error message --- astronaut/astronaut | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/astronaut/astronaut b/astronaut/astronaut index 95403a8..b349803 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -171,7 +171,8 @@ download() { [ "$4" ] && local cmd="$4" || local cmd="$cmd_download" eval $(echo "$cmd" | sed -e "s/{dst}/'$(safe_sed "$path")'/g" -e "s/{src}/'$(safe_sed "$1")'/g") - if [ "$2" -a "$(_mksum "$path")" != "$2" ]; then + local checksum="$(_mksum "$path")" + if [ "$2" -a "$checksum" != "$2" ]; then _msg "Checksum: $checksum" _exiterr 'Checksum failed' fi