summaryrefslogtreecommitdiff
path: root/type
diff options
context:
space:
mode:
authorDennis Camera <skonfig@dtnr.ch>2023-12-28 21:09:31 +0100
committerDennis Camera <skonfig@dtnr.ch>2023-12-28 21:09:31 +0100
commit571c303db31aa3521ef19d019c3741fc79860d94 (patch)
tree813d11a87b8d79d0c851342644c74bfb370ee412 /type
parent6c76710f58120635d62135d9ad1337afdfe564b3 (diff)
download__dtnrch_egov-571c303db31aa3521ef19d019c3741fc79860d94.tar.gz
__dtnrch_egov-571c303db31aa3521ef19d019c3741fc79860d94.zip
[type/__dtnrch_etax_fl*] Delete downloaded DEB if the checksum check fails
Diffstat (limited to 'type')
-rwxr-xr-xtype/__dtnrch_etax_flnp/manifest9
1 files changed, 9 insertions, 0 deletions
diff --git a/type/__dtnrch_etax_flnp/manifest b/type/__dtnrch_etax_flnp/manifest
index c7c8fca..aa69251 100755
--- a/type/__dtnrch_etax_flnp/manifest
+++ b/type/__dtnrch_etax_flnp/manifest
@@ -137,6 +137,15 @@ in
exit 1
}
test "$(cksum "${local_file}" | cut -d' ' -f1,2)" = "${CKSUM}" || {
+ # delete the bugged file so that the next run will download a
+ # fresh copy
+ case ${local_file-}
+ in
+ # security check
+ (${__type:?}/*.deb)
+ rm -f "${local_file:?}" ;;
+ esac
+
echo 'Checksums do not match.' >&2
exit 1
}