From ed6eb030f4bf489a935891eb5fbdd1f5b0dd659d Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Thu, 28 Mar 2024 19:48:36 +0100 Subject: [PATCH] scripts/rsync-generation/mksnapshot: shellcheck Signed-off-by: Fabian Groffen --- scripts/rsync-generation/mksnapshot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/rsync-generation/mksnapshot.sh b/scripts/rsync-generation/mksnapshot.sh index 7879adc353..22808d58d4 100755 --- a/scripts/rsync-generation/mksnapshot.sh +++ b/scripts/rsync-generation/mksnapshot.sh @@ -14,7 +14,7 @@ SNAME=${PWD}/portage-$(date +%Y%m%d -d @${YESTERDAY}).tar TMPDIR=${PWD}/tmp-prefix-snapshot # clean up -find . -maxdepth 2 -daystart -ctime +4 -type f | xargs --no-run-if-empty rm +find . -maxdepth 2 -daystart -ctime +4 -type f -exec rm '{}' + # pull in active snapshot BOOTSTRAP_SNAPSHOT=$( \ @@ -31,7 +31,7 @@ mkdir -p "${TMPDIR}" # quickly take a snapshot, such that we get a consistent image pushd "${RSYNCTREE}" > /dev/null || exit 1 tar -cf "${SNAME}" --exclude=snapshots -- * || exit 1 -popd > /dev/null +popd > /dev/null || exit 1 # now revamp it such that it's in a directory "portage" rm -Rf "${TMPDIR}" @@ -40,7 +40,7 @@ pushd "${TMPDIR}" > /dev/null || exit 1 mkdir portage tar -xf "${SNAME}" -C portage/ tar --numeric-owner --format=posix --hard-dereference -cf "${SNAME}" portage/ -popd > /dev/null +popd > /dev/null || exit 1 rm -Rf "${TMPDIR}"