Browse Source

Fix displaying checksum in error message

master
mid-kid 8 years ago
parent
commit
147b4b98a1
  1. 3
      astronaut/astronaut

3
astronaut/astronaut

@ -171,7 +171,8 @@ download() {
[ "$4" ] && local cmd="$4" || local cmd="$cmd_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") 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" _msg "Checksum: $checksum"
_exiterr 'Checksum failed' _exiterr 'Checksum failed'
fi fi

Loading…
Cancel
Save