Commit 6e59a690 authored by Kristian Klausen's avatar Kristian Klausen 🎉 Committed by Jelle van der Waa
Browse files

arch_boxes_sync: Fix old releases cleanup not working due to NUL character

--output-delimiter="" apparently means use the NUL character[1].

[1] https://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=0e46753d7c9519d7378cd3a4e0951a36ac32ffe7
parent efa03c61
...@@ -37,4 +37,4 @@ ln -nsf "${LATEST_RELEASE_TAG}" "${ARCH_BOXES_PATH}/latest" ...@@ -37,4 +37,4 @@ ln -nsf "${LATEST_RELEASE_TAG}" "${ARCH_BOXES_PATH}/latest"
echo "Removing old releases" echo "Removing old releases"
cd "${ARCH_BOXES_PATH}" cd "${ARCH_BOXES_PATH}"
comm --output-delimiter="" -3 <({ ls | grep -v latest | sort -r | head -n "${MAX_RELEASES}"; echo latest; } | sort) <(ls | sort) | xargs --no-run-if-empty rm -rvf comm --output-delimiter="" -3 <({ ls | grep -v latest | sort -r | head -n "${MAX_RELEASES}"; echo latest; } | sort) <(ls | sort) | tr -d '\0' | xargs --no-run-if-empty rm -rvf
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment