diff options
-rw-r--r-- | src/dist/libiquity.sh | 6 | ||||
-rw-r--r-- | src/dist/libreboot.sh | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/src/dist/libiquity.sh b/src/dist/libiquity.sh index d4fced8..fa52787 100644 --- a/src/dist/libiquity.sh +++ b/src/dist/libiquity.sh @@ -93,6 +93,7 @@ dist_libiquity_get_rom_taurinus_201506() if ! sum="$(dl_temp "${mirror}/${version}/SHA512SUMS" 'sums')"; then err 'Failed to download checksums' rm_temp 'sums' + return 1 fi sum="$(grep -F " ./rom/${archive}" "${sum}" | cut -d ' ' -f 1)" if ! archive="$(dl_temp "${mirror}/${version}/rom/${archive}" \ @@ -100,6 +101,7 @@ dist_libiquity_get_rom_taurinus_201506() err 'Failed to download ROMs archive' rm_temp 'sums' rm_temp 'roms' + return 1 fi # Verify checksum. @@ -137,6 +139,7 @@ dist_libiquity_get_rom_taurinus_201506() rm_temp 'sums' rm_temp 'roms' rm_temp 'rom' + return 1 fi rm_temp 'sums' @@ -164,6 +167,7 @@ dist_libiquity_get_rom_current() if ! sum="$(dl_temp "${mirror}/${version}/SHA512SUMS" 'sums')"; then err 'Failed to download checksums' rm_temp 'sums' + return 1 fi sum="$(grep -F " ./rom/grub/${archive}" "${sum}" | cut -d ' ' -f 1)" if ! archive="$(dl_temp "${mirror}/${version}/rom/grub/${archive}" \ @@ -171,6 +175,7 @@ dist_libiquity_get_rom_current() err 'Failed to download ROMs archive' rm_temp 'sums' rm_temp 'roms' + return 1 fi # Verify checksum. @@ -208,6 +213,7 @@ dist_libiquity_get_rom_current() rm_temp 'sums' rm_temp 'roms' rm_temp 'rom' + return 1 fi rm_temp 'sums' diff --git a/src/dist/libreboot.sh b/src/dist/libreboot.sh index 00d53ca..ad3155d 100644 --- a/src/dist/libreboot.sh +++ b/src/dist/libreboot.sh @@ -104,6 +104,7 @@ dist_libreboot_get_rom_20150518() if ! sum="$(dl_temp "${mirror}/${version}/sha512sum.txt" 'sums')"; then err 'Failed to download checksums' rm_temp 'sums' + return 1 fi sum="$(grep -F " ./rom/${archive}" "${sum}" | cut -d ' ' -f 1)" if ! archive="$(dl_temp "${mirror}/${version}/rom/${archive}" \ @@ -111,6 +112,7 @@ dist_libreboot_get_rom_20150518() err 'Failed to download ROMs archive' rm_temp 'sums' rm_temp 'roms' + return 1 fi # Verify checksum. @@ -148,6 +150,7 @@ dist_libreboot_get_rom_20150518() rm_temp 'sums' rm_temp 'roms' rm_temp 'rom' + return 1 fi rm_temp 'sums' @@ -175,6 +178,7 @@ dist_libreboot_get_rom_current() if ! sum="$(dl_temp "${mirror}/${version}/SHA512SUMS" 'sums')"; then err 'Failed to download checksums' rm_temp 'sums' + return 1 fi sum="$(grep -F " ./rom/grub/${archive}" "${sum}" | cut -d ' ' -f 1)" if ! archive="$(dl_temp "${mirror}/${version}/rom/grub/${archive}" \ @@ -182,6 +186,7 @@ dist_libreboot_get_rom_current() err 'Failed to download ROMs archive' rm_temp 'sums' rm_temp 'roms' + return 1 fi # Verify checksum. @@ -219,6 +224,7 @@ dist_libreboot_get_rom_current() rm_temp 'sums' rm_temp 'roms' rm_temp 'rom' + return 1 fi rm_temp 'sums' |