From a644619d1f0e6b19aadae0ce5ef7fea7cacdf9f3 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Mon, 13 Mar 2023 21:24:13 -0700 Subject: [PATCH] Enclose filenames in single quotes to capture literals #99 --- install_and_cache_pkgs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_and_cache_pkgs.sh b/install_and_cache_pkgs.sh index c430222..3a6eb0d 100755 --- a/install_and_cache_pkgs.sh +++ b/install_and_cache_pkgs.sh @@ -93,7 +93,7 @@ for installed_package in ${installed_packages}; do & get_install_filepath "" "${package_name}" "preinst" \ & get_install_filepath "" "${package_name}" "postinst"; } | while IFS= read -r f; do test -f "${f}" -o -L "${f}" && get_tar_relpath "${f}"; done | - xargs -I {} echo \"{}\" | + xargs -I {} echo \'{}\' | # Single quotes ensure literals like backslash get captured. sudo xargs tar -cf "${cache_filepath}" -C / log " done (compressed size $(du -h "${cache_filepath}" | cut -f1))."