mirror of
https://github.com/awalsh128/cache-apt-pkgs-action.git
synced 2026-08-09 11:13:57 +00:00
work around the Reverse=Provides: being emitted by the go binary
This commit is contained in:
parent
9a222f7e76
commit
ac7844076b
17
lib.sh
17
lib.sh
|
|
@ -105,17 +105,24 @@ function get_normalized_package_list {
|
||||||
# Remove commas, and block scalar folded backslashes,
|
# Remove commas, and block scalar folded backslashes,
|
||||||
# extraneous spaces at the middle, beginning and end
|
# extraneous spaces at the middle, beginning and end
|
||||||
# then sort.
|
# then sort.
|
||||||
local packages=$(echo "${1}" \
|
local packages
|
||||||
|
packages=$(echo "${1}" \
|
||||||
| sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g' \
|
| sed 's/[,\]/ /g; s/\s\+/ /g; s/^\s\+//g; s/\s\+$//g' \
|
||||||
| sort -t' ')
|
| sort -t' ')
|
||||||
local script_dir="$(dirname -- "$(realpath -- "${0}")")"
|
local script_dir
|
||||||
|
script_dir="$(dirname -- "$(realpath -- "${0}")")"
|
||||||
|
|
||||||
local architecture=$(dpkg --print-architecture)
|
local architecture
|
||||||
|
architecture=$(dpkg --print-architecture)
|
||||||
|
local result
|
||||||
if [ "${architecture}" == "arm64" ]; then
|
if [ "${architecture}" == "arm64" ]; then
|
||||||
${script_dir}/apt_query-arm64 normalized-list ${packages}
|
result=$("${script_dir}/apt_query-arm64" normalized-list "${packages}")
|
||||||
else
|
else
|
||||||
${script_dir}/apt_query-x86 normalized-list ${packages}
|
result=$("${script_dir}/apt_query-x86" normalized-list "${packages}")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Remove "Reverse=Provides: " prefix from strings if present
|
||||||
|
echo "${result//Reverse=Provides: /}"
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue