From 6e061b91428432839782ad4bf6d46c5f9dcc0f95 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Fri, 5 Aug 2022 23:42:36 -0700 Subject: [PATCH] Minor formatting change and whitespace removal. --- install_and_cache_pkgs.sh | 4 ++-- lib.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/install_and_cache_pkgs.sh b/install_and_cache_pkgs.sh index c0a30cc..20ebcd2 100755 --- a/install_and_cache_pkgs.sh +++ b/install_and_cache_pkgs.sh @@ -75,8 +75,8 @@ 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 / - log " done (compressed size $(du -h "${cache_filepath}" | cut -f1))." + xargs tar -czf "${cache_filepath}" -C / + log " * Cached ${installed_package_name} to ${cache_filepath} (compressed size $(du -h "${cache_filepath}" | cut -f1))." fi # Comma delimited name:ver pairs in the all packages manifest. diff --git a/lib.sh b/lib.sh index 0aedaee..ead44a9 100755 --- a/lib.sh +++ b/lib.sh @@ -6,7 +6,7 @@ function normalize_package_list { # Remove extraneous spaces at the middle, beginning, and end. local trimmed="$(echo "${stripped}" | sed 's/\s\+/ /g; s/^\s\+//g; s/\s\+$//g')" 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.