Merge pull request #32 from awalsh128/dev

Switch to CLI safe apt command.
This commit is contained in:
Andrew Walsh 2022-07-23 00:25:57 -07:00 committed by GitHub
commit b1e472476d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

2
lib.sh
View file

@ -22,7 +22,7 @@ function get_package_name_ver {
IFS=\: read name ver <<< "${1}"
# If version not found in the fully qualified package value.
if test -z "${ver}"; then
ver="$(grep "Version:" <<< "$(apt show ${name})" | awk '{print $2}')"
ver="$(grep "Version:" <<< "$(apt-cache show ${name})" | awk '{print $2}')"
fi
echo "${name}" "${ver}"
}