summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-03-28 19:48:36 +0100
committerFabian Groffen <grobian@gentoo.org>2024-03-28 19:48:36 +0100
commited6eb030f4bf489a935891eb5fbdd1f5b0dd659d (patch)
treeffe530e6f4cedb68efd199d7414ad3005365366c
parentscripts/auto-bootstraps/dobootstrap: shellcheck (diff)
downloadprefix-ed6eb030f4bf489a935891eb5fbdd1f5b0dd659d.tar.gz
prefix-ed6eb030f4bf489a935891eb5fbdd1f5b0dd659d.tar.bz2
prefix-ed6eb030f4bf489a935891eb5fbdd1f5b0dd659d.zip
scripts/rsync-generation/mksnapshot: shellcheck
Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rwxr-xr-xscripts/rsync-generation/mksnapshot.sh6
1 files 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}"