From 45b8861f3a7c4da4be7cdf6e950eab8ba54aeea6 Mon Sep 17 00:00:00 2001 From: awalsh128 Date: Thu, 30 Jun 2022 01:06:32 -0700 Subject: [PATCH] Fix package name ver function output. --- lib.sh | 2 +- pre_cache_action.sh | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib.sh b/lib.sh index a8011a2..975fc3f 100755 --- a/lib.sh +++ b/lib.sh @@ -15,5 +15,5 @@ function get_package_name_ver { if test -z "${ver}"; then ver="$(grep "Version:" <<< "$(apt show ${name})" | awk '{print $2}')" fi - echo 'package_name="${name}"; package_ver="${ver}"' + echo ""${name}"="${ver}"" } diff --git a/pre_cache_action.sh b/pre_cache_action.sh index 1b0c70c..84d9868 100755 --- a/pre_cache_action.sh +++ b/pre_cache_action.sh @@ -41,9 +41,8 @@ for package in ${packages}; do echo "aborted." echo "Package '${package}' not found." >&2 exit 3 - fi - get_package_name_ver "${package}" # -> package_name, package_ver - versioned_packages="${versioned_packages} ${package_name}=${package_ver}" + fi + versioned_packages=""${versioned_packages}" "$(get_package_name_ver "${package}")"" done echo "done."