diff --git a/lib.sh b/lib.sh index 7c88180..4000bbe 100755 --- a/lib.sh +++ b/lib.sh @@ -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}" } @@ -35,4 +35,4 @@ function write_manifest { # 0:-1 to remove trailing comma, delimit by newline and sort echo "${2:0:-1}" | tr ',' '\n' | sort > ${3} log "done." -} \ No newline at end of file +}