Compare commits
No commits in common. "2b50e8dc952531db85bdaffc1a7542f06f3de090" and "1b03d6113da37b74c15a06e1da78b0d81516fd06" have entirely different histories.
2b50e8dc95
...
1b03d6113d
@ -886,38 +886,32 @@ function fetch_and_deploy_gh_release() {
|
||||
local arch
|
||||
arch=$(dpkg --print-architecture 2>/dev/null || uname -m)
|
||||
[[ "$arch" == "x86_64" ]] && arch="amd64"
|
||||
[[ "$arch" == "aarch64" ]] && arch="arm64"
|
||||
#[[ "$arch" == "aarch64" ]] && arch="arm64"
|
||||
|
||||
local assets url_match=""
|
||||
assets=$(echo "$json" | jq -r '.assets[].browser_download_url')
|
||||
|
||||
# 1. Expliziten Pattern-Parameter bevorzugen
|
||||
# If explicit filename pattern is provided (param $6), match that first
|
||||
if [[ -n "$asset_pattern" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" =~ $asset_pattern || "$u" == *"$asset_pattern" ]]; then
|
||||
[[ "$u" =~ $asset_pattern || "$u" == *"$asset_pattern" ]] && url_match="$u" && break
|
||||
done
|
||||
fi
|
||||
|
||||
# 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
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# 2. Wenn kein Pattern-Match, gezielt nach Architektur suchen
|
||||
# Fallback: any .deb file
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" == *"${arch}"* && "$u" == *.deb ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
# 3. Fallback: irgendein .deb
|
||||
if [[ -z "$url_match" ]]; then
|
||||
for u in $assets; do
|
||||
if [[ "$u" == *.deb ]]; then
|
||||
url_match="$u"
|
||||
break
|
||||
fi
|
||||
[[ "$u" =~ \.deb$ ]] && url_match="$u" && break
|
||||
done
|
||||
fi
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user