From 2958d22f03ffa3cb7c120aa57c38ebf337bfef3f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Fri, 6 Mar 2020 11:55:18 +0100 Subject: build-isos: also remove obsolete checksums --- build-isos | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/build-isos b/build-isos index 6843fe1..480d9e0 100755 --- a/build-isos +++ b/build-isos @@ -77,10 +77,19 @@ case "$(hostname -s)" in find "${destination}" -name 'archlinux-*' -not -name 'archlinux-'"${date}"'-*' \ | while read -r to_delete; do - if diff -q "${to_delete}" "${archive}/iso/${to_delete#${destination}/}"; then + if diff -q "${to_delete}" "${archive}/iso/${to_delete#${destination}/}" >/dev/null; then rm "${to_delete}" + printf '%s\n' "${to_delete}" \ + | sed ' + s@^.*/@@ + s/\./\\./g + s@.*@/ \0$/d@ + ' fi - done + done \ + >> "${tmp_dir}/delete-regex" + sed -i -f "${tmp_dir}/delete-regex" "${destination}/sha512sums" + sed -i -f "${tmp_dir}/delete-regex" "${destination}/md5sums" echo '... done.' ;; -- cgit v1.2.3-70-g09d2