Update installation to consider symlinks as well.

Addresses problem raised in #25
This commit is contained in:
Andrew Walsh 2022-07-14 21:19:19 -07:00 committed by GitHub
parent 768417e4ec
commit 39faaf9bee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -59,7 +59,7 @@ for package in ${normalized_packages}; do
# Pipe all package files (no folders) to Tar.
dpkg -L "${cache_package_name}" |
while IFS= read -r f; do
if test -f $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 |
xargs tar -czf "${cache_filepath}" -C /
echo "done (compressed size $(du -k "${cache_filepath}" | cut -f1))."