diff --git a/astronaut/astronaut b/astronaut/astronaut index d8a0f9a..95403a8 100755 --- a/astronaut/astronaut +++ b/astronaut/astronaut @@ -165,19 +165,18 @@ download() { [ "$3" ] && local filename="$3" || local filename="$(basename $(echo "$1" | cut -d? -f1))" local path="$dir_source/$name/$filename" - [ "$2" -a -f "$path" ] && local checksum="$(_mksum "$path")" || true - - if [ ! -e "$path" -o "$checksum" != "$2" ]; then + if [ ! -e "$path" -o "$(_mksum "$path")" != "$2" ]; then _msg "Downloading $filename" [ "$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") - checksum="$(_mksum "$path")" - if [ "$2" -a "$checksum" != "$2" ]; then + if [ "$2" -a "$(_mksum "$path")" != "$2" ]; then _msg "Checksum: $checksum" _exiterr 'Checksum failed' fi + elif [ ! -f "$path" ]; then + _exiterr "'$path' exists but isn't a file?" fi } diff --git a/satellites/android-tools.sat b/satellites/android-tools.sat index 4c178c8..db4709a 100644 --- a/satellites/android-tools.sat +++ b/satellites/android-tools.sat @@ -1,7 +1,7 @@ import 'vcs/git' name=android-tools -version=7.1.2_r6 +version=7.1.2_r8 update_url='https://android.googlesource.com/platform/system/core/+refs' update_names=""