Account for packages without deps.

This commit is contained in:
awalsh128 2022-07-25 21:02:11 -07:00
parent c0c05ca285
commit 799512caf1

4
lib.sh
View file

@ -22,7 +22,11 @@ function get_dep_packages {
exit 2
fi
done < <(apt-fast install --dry-run --yes "${1}" | grep "^Inst" | grep -v "^Inst ${1} " | sort)
if test -n "${dep_packages}"; then
echo "${dep_packages:0:-1}" # Removing trailing space.
else
echo ""
fi
}
# Split fully qualified package into name and version.