diff options
-rwxr-xr-x | build-isos | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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.' ;; |