Skip to content

Commit

Permalink
scripts/rsync-generation/mksnapshot: shellcheck
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Groffen <[email protected]>
  • Loading branch information
grobian committed Mar 28, 2024
1 parent 97ff630 commit ed6eb03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/rsync-generation/mksnapshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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=$( \
Expand All @@ -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}"
Expand All @@ -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}"

Expand Down

0 comments on commit ed6eb03

Please sign in to comment.