Change to zstd compression (#46).

This commit is contained in:
awalsh128 2022-08-07 06:00:09 -07:00
parent dbfb2a1334
commit b0da983722
2 changed files with 3 additions and 3 deletions

View file

@ -75,7 +75,7 @@ for installed_package in ${installed_packages}; 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
done |
xargs tar -czf "${cache_filepath}" -C /
xargs tar -caf "${cache_filepath}" -C /
log " * Cached ${installed_package_name} to ${cache_filepath} (compressed size $(du -h "${cache_filepath}" | cut -f1))."
fi

4
lib.sh
View file

@ -13,11 +13,11 @@ function normalize_package_list {
# <name>:<version> <name:version>...
function get_installed_packages {
install_log_filepath="${1}"
local regex="^Unpacking ([^ :]+)([^ ]+)? (\[[^ ]+\]\s)?\(([^ )]+)"
local regex="^Unpacking ([^ :]+)([^ ]+)? (\[[^ ]+\]\s)?\(([^ )]+)"
dep_packages=""
while read -r line; do
if [[ "${line}" =~ ${regex} ]]; then
dep_packages="${dep_packages}${BASH_REMATCH[1]}:${BASH_REMATCH[4]} "
dep_packages="${dep_packages}${BASH_REMATCH[1]}:${BASH_REMATCH[4]} "
else
log_err "Unable to parse package name and version from \"${line}\""
exit 2