mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-20 10:07:08 +00:00
Merge branch 'dev' into staging
This commit is contained in:
commit
5e0eff102b
|
@ -75,8 +75,8 @@ 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 -czf "${cache_filepath}" -C /
|
sudo xargs tar -caf "${cache_filepath}" -C /
|
||||||
log " done (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
|
||||||
|
|
||||||
# Comma delimited name:ver pairs in the all packages manifest.
|
# Comma delimited name:ver pairs in the all packages manifest.
|
||||||
|
|
2
lib.sh
2
lib.sh
|
@ -6,7 +6,7 @@ function normalize_package_list {
|
||||||
# Remove extraneous spaces at the middle, beginning, and end.
|
# Remove extraneous spaces at the middle, beginning, and end.
|
||||||
local trimmed="$(echo "${stripped}" | sed 's/\s\+/ /g; s/^\s\+//g; s/\s\+$//g')"
|
local trimmed="$(echo "${stripped}" | sed 's/\s\+/ /g; s/^\s\+//g; s/\s\+$//g')"
|
||||||
local sorted="$(echo ${trimmed} | tr ' ' '\n' | sort | tr '\n' ' ')"
|
local sorted="$(echo ${trimmed} | tr ' ' '\n' | sort | tr '\n' ' ')"
|
||||||
echo "${sorted}"
|
echo "${sorted}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Gets a list of installed packages as space delimited pairs with each pair colon delimited.
|
# Gets a list of installed packages as space delimited pairs with each pair colon delimited.
|
||||||
|
|
Loading…
Reference in a new issue