Fix package name ver function output.

This commit is contained in:
awalsh128 2022-06-30 01:06:32 -07:00
parent c961be0ea5
commit 45b8861f3a
2 changed files with 3 additions and 4 deletions

2
lib.sh
View file

@ -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}""
}

View file

@ -42,8 +42,7 @@ for package in ${packages}; do
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}"
versioned_packages=""${versioned_packages}" "$(get_package_name_ver "${package}")""
done
echo "done."