Fix package enumeration.
This commit is contained in:
parent
e6baec0bc6
commit
686ae5cbb1
2 changed files with 6 additions and 6 deletions
|
@ -14,12 +14,12 @@ cache_dir="${1}"
|
|||
input_packages="${@:2}"
|
||||
|
||||
# Trim commas, excess spaces, and sort.
|
||||
packages="$(normalize_package_list "${input_packages}")"
|
||||
normalized_packages="$(normalize_package_list "${input_packages}")"
|
||||
|
||||
package_count=$(echo "${packages}" | wc -w)
|
||||
package_count=$(echo "${normalized_packages}" | wc -w)
|
||||
echo "Clean installing and caching ${package_count} package(s)."
|
||||
echo "Package list:"
|
||||
for package in "${packages}"; do
|
||||
for package in ${normalized_packages}; do
|
||||
echo "- ${package}"
|
||||
done
|
||||
|
||||
|
@ -29,8 +29,8 @@ echo "done."
|
|||
|
||||
manifest=""
|
||||
echo "Clean installing and caching ${package_count} packages..."
|
||||
for package in "${packages}"; do
|
||||
get_package_name_ver "${package}" # -> package_name, package_ver
|
||||
for package in ${normalized_packages}; do
|
||||
read package_name package_ver < <(get_package_name_ver "${package}")
|
||||
package_deps="$(apt-get install --dry-run --yes "${package_name}" | grep "^Inst" | awk '{print $2}')"
|
||||
|
||||
echo "- ${package_name}"
|
||||
|
|
|
@ -42,7 +42,7 @@ for package in ${packages}; do
|
|||
echo "Package '${package}' not found." >&2
|
||||
exit 3
|
||||
fi
|
||||
read package_name package_ver < <(get_package_name_ver "${package}") # -> package_name, package_ver
|
||||
read package_name package_ver < <(get_package_name_ver "${package}")
|
||||
versioned_packages=""${versioned_packages}" "${package_name}"="${package_ver}""
|
||||
done
|
||||
echo "done."
|
||||
|
|
Loading…
Reference in a new issue