mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-20 18:17:15 +00:00
Change to zstd compression (#46).
This commit is contained in:
parent
dbfb2a1334
commit
b0da983722
|
@ -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
4
lib.sh
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue