Commit d7cddb4f authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play common.sh: snap_get_pkgurl(): use print info --debian-arch

parent 7847a665
......@@ -146,14 +146,7 @@ install_pack_pkgurl()
snap_get_pkgurl()
{
local SNAPNAME="$1"
case "$(epm print info -a)" in
x86_64)
local ARCH="amd64" ;;
aarch64)
local ARCH="arm64" ;;
*)
local ARCH="$(epm print info -a)" ;;
esac
ARCH="$(epm print info --debian-arch)"
is_url "$SNAPNAME" && SNAPNAME="$(basename "$SNAPNAME")"
eget -O- -H Snap-Device-Series:16 https://api.snapcraft.io/v2/snaps/info/$SNAPNAME | epm --inscript tool json -b | grep -A 8 "$ARCH" | grep '\["channel-map",[0-9],"download","url"\]' | head -n1 | sed 's/.*"\(https:\/\/.*\)".*/\1/'
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment