mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2025-09-20 10:07:08 +00:00
parent
4087e6bcf9
commit
7d122843ce
4
lib.sh
4
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."
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue