mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-08 01:08:11 +00:00
Replace tools.func call that checks arch
This commit is contained in:
@@ -2735,10 +2735,13 @@ function fetch_and_deploy_codeberg_release() {
|
||||
# Fall back to architecture heuristic
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -3035,7 +3038,11 @@ _gh_scan_older_releases() {
|
||||
done)
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE "($arch|amd64|x86_64|aarch64|arm64).*\.deb$" && echo true)
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(amd64|x86_64).*\.deb$' && echo true)
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '(arm64|aarch64).*\.deb$' && echo true)
|
||||
fi
|
||||
fi
|
||||
if [[ "$has_match" != "true" ]]; then
|
||||
has_match=$(echo "$releases_list" | jq -r ".[$i].assets[].browser_download_url" | grep -qE '\.deb$' && echo true)
|
||||
@@ -3233,10 +3240,13 @@ function fetch_and_deploy_gh_release() {
|
||||
# If no match via explicit pattern, fall back to architecture heuristic
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|amd64|x86_64|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
@@ -3267,10 +3277,13 @@ function fetch_and_deploy_gh_release() {
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ ($arch|aarch64|arm64).*\.deb$ ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
if [[ "${arch,,}" =~ ^(amd64|x86_64)$ ]]; then
|
||||
[[ "$u" =~ (amd64|x86_64).*\.deb$ ]] || continue
|
||||
elif [[ "${arch,,}" =~ ^(arm64|aarch64)$ ]]; then
|
||||
[[ "$u" =~ (arm64|aarch64).*\.deb$ ]] || continue
|
||||
fi
|
||||
url_match="$u"
|
||||
break
|
||||
done
|
||||
fi
|
||||
if [[ -z "$url_match" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user