From f9b0016d025185cfddbff87dbb6645eb6ced7963 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Thu, 30 Jun 2022 06:28:52 -0700 Subject: [PATCH] Inline dependency reporting in log. --- install_and_cache_pkgs.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_and_cache_pkgs.sh b/install_and_cache_pkgs.sh index 0d741d9..1b49407 100755 --- a/install_and_cache_pkgs.sh +++ b/install_and_cache_pkgs.sh @@ -40,11 +40,11 @@ for package in ${normalized_packages}; do manifest_main="${manifest_main}${package_name}:${package_ver}," all_packages="$(apt-get install --dry-run --yes "${package_name}" | grep "^Inst" | awk '{print $2}')" - dep_packages="$(grep -v "${package_name}" <<< ${all_packages})" + dep_packages="$(echo ${dep_packages} | grep -v "${package_name}" | tr '\n' ,)" echo "- ${package_name}" echo " * Version: ${package_ver}" - echo " * Dependencies: ${dep_packages}" + echo " * Dependencies: ${dep_packages:0:-1}" echo -n " * Installing..." # Zero interaction while installing or upgrading the system via apt. sudo DEBIAN_FRONTEND=noninteractive apt-get --yes install "${package}" > /dev/null