From 2106e8736f4bfc6b1b016c49c77733bd56a6f24e Mon Sep 17 00:00:00 2001 From: Colin Casey Date: Wed, 6 Mar 2024 10:21:18 -0400 Subject: [PATCH] Handle when multiple packages are declared on a single line. --- bin/report | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/report b/bin/report index 7c7b723..78cc8bf 100755 --- a/bin/report +++ b/bin/report @@ -18,7 +18,13 @@ while IFS= read -r line; do elif [[ $line == *deb ]]; then custom_packages+=("${line}") else - packages+=("${line}") + # while this is not documented behavior, the Aptfile format technically + # does allow for multiple packages separated by spaces to be specified + # on a single line due to how the download command is implemented + IFS=' ' read -ra package_names <<< "${line}" + for package_name in "${package_names[@]}"; do + packages+=("${package_name}") + done fi done < <(grep --invert-match -e "^#" -e "^\s*$" "${BUILD_DIR}/Aptfile")