Update tar create to run as super user.

Address issue #47 with Redis server installs.
This commit is contained in:
Andrew Walsh 2022-08-31 19:23:44 -07:00 committed by GitHub
parent b0da983722
commit 258757ba5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -75,7 +75,7 @@ for installed_package in ${installed_packages}; do
while IFS= read -r f; do while IFS= read -r f; do
if test -f $f || test -L $f; then echo "${f:1}"; fi; #${f:1} removes the leading slash that Tar disallows if test -f $f || test -L $f; then echo "${f:1}"; fi; #${f:1} removes the leading slash that Tar disallows
done | done |
xargs tar -caf "${cache_filepath}" -C / sudo xargs tar -caf "${cache_filepath}" -C /
log " * Cached ${installed_package_name} to ${cache_filepath} (compressed size $(du -h "${cache_filepath}" | cut -f1))." log " * Cached ${installed_package_name} to ${cache_filepath} (compressed size $(du -h "${cache_filepath}" | cut -f1))."
fi fi