Commit e9ed9ccb authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: use --distro-arch/--debian-arch instead of arch cases

parent d7cddb4f
...@@ -17,18 +17,7 @@ case "$(epm print info -p)" in ...@@ -17,18 +17,7 @@ case "$(epm print info -p)" in
pkgtype=deb ;; pkgtype=deb ;;
esac esac
if [ $pkgtype = 'deb' ]; then arch=$(epm print info --distro-arch)
case $(epm print info -a) in
x86_64)
arch=amd64 ;;
aarch64)
arch=arm64 ;;
*)
fatal "Unsupported arch $arch for $(epm print info -d)"
esac
else
arch=$(epm print info -a)
fi
PKGURL=$(eget --list --latest https://delta.chat/ru/download "deltachat-desktop*$arch.$pkgtype") PKGURL=$(eget --list --latest https://delta.chat/ru/download "deltachat-desktop*$arch.$pkgtype")
......
...@@ -11,29 +11,9 @@ URL="https://github.com/Figma-Linux/figma-linux" ...@@ -11,29 +11,9 @@ URL="https://github.com/Figma-Linux/figma-linux"
[ "$VERSION" = "*" ] && VERSION="[0-9]*" [ "$VERSION" = "*" ] && VERSION="[0-9]*"
pkgtype="$(epm print info -p)" pkgtype="$(epm print info -p)"
arch="$(epm print info --distro-arch)"
if [ "$pkgtype" == "rpm" ] ; then file="${PKGNAME}_${VERSION}_linux_$arch.$pkgtype"
case "$(epm print info -a)" in
x86_64)
file="${PKGNAME}_${VERSION}_linux_x86_64.$pkgtype" ;;
aarch64)
file="${PKGNAME}_${VERSION}_linux_aarch64.$pkgtype" ;;
esac
elif [ "$pkgtype" == "deb" ] ; then
case "$(epm print info -a)" in
x86_64)
file="${PKGNAME}_${VERSION}_linux_amd64.$pkgtype" ;;
aarch64)
file="${PKGNAME}_${VERSION}_linux_arm64.$pkgtype" ;;
esac
elif [ "$pkgtype" == "pacman" ] ; then
case "$(epm print info -a)" in
x86_64)
file="${PKGNAME}_${VERSION}_linux_x64.$pkgtype" ;;
aarch64)
file="${PKGNAME}_${VERSION}_linux_aarch64.$pkgtype" ;;
esac
fi
PKGURL=$(eget --list --latest https://github.com/Figma-Linux/figma-linux/releases "$file") PKGURL=$(eget --list --latest https://github.com/Figma-Linux/figma-linux/releases "$file")
......
...@@ -8,14 +8,7 @@ URL="https://freetubeapp.io/" ...@@ -8,14 +8,7 @@ URL="https://freetubeapp.io/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
case "$(epm print info -a)" in arch="$(epm print info --debian-arch)"
aarch64)
arch="arm64" ;;
armhf)
arch="armv7l" ;;
x86_64)
arch="amd64" ;;
esac
PKGURL=$(eget --list --latest https://github.com/FreeTubeApp/FreeTube/releases "freetube*${VERSION}*${arch}.deb") PKGURL=$(eget --list --latest https://github.com/FreeTubeApp/FreeTube/releases "freetube*${VERSION}*${arch}.deb")
......
#!/bin/sh #!/bin/sh
PKGNAME=goofcord PKGNAME=goofcord
SUPPORTEDARCHES="x86_64 arm64" SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2" VERSION="$2"
DESCRIPTION="The highly configurable and privacy minded discord client" DESCRIPTION="The highly configurable and privacy minded discord client"
URL="https://github.com/Milkshiift/GoofCord/" URL="https://github.com/Milkshiift/GoofCord/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in
x86_64)
arch=amd64
;;
aarch64)
arch=arm64
;;
*)
fatal "$arch arch is not supported"
;;
esac
pkgtype=deb pkgtype=deb
......
...@@ -8,14 +8,9 @@ URL="https://github.com/juanfont/headscale" ...@@ -8,14 +8,9 @@ URL="https://github.com/juanfont/headscale"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
case "$(epm print info -a)" in arch="$(epm print info --debian-arch)"
x86_64) case "$arch" in
arch="amd64" ;; i386)
aarch64)
arch="arm64" ;;
armhf)
arch="armv7l" ;;
i586)
arch="386" ;; arch="386" ;;
esac esac
......
...@@ -8,15 +8,7 @@ URL="https://github.com/4gray/iptvnator" ...@@ -8,15 +8,7 @@ URL="https://github.com/4gray/iptvnator"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch=$(epm print info -a) arch=$(epm print info --debian-arch)
case "$arch" in
x86_64)
arch=amd64
;;
aarch64)
arch=arm64
;;
esac
pkgtype=deb pkgtype=deb
......
...@@ -8,10 +8,9 @@ URL="https://librewolf.net/" ...@@ -8,10 +8,9 @@ URL="https://librewolf.net/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch=x86_64 arch="$(epm print info -a)"
if [ "$arch" = "aarch64" ]; then
if [ "$(epm print info -a)" = "aarch64" ]; then
arch="arm64" arch="arm64"
fi fi
......
...@@ -8,18 +8,7 @@ URL="https://mattermost.com/" ...@@ -8,18 +8,7 @@ URL="https://mattermost.com/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in
x86_64)
arch=amd64
;;
aarch64)
arch=arm64
;;
*)
fatal "$arch arch is not supported"
;;
esac
PKGURL=$(get_github_url "https://github.com/mattermost/desktop/" "$(epm print constructname $PKGNAME ".$VERSION*" $arch "deb")") PKGURL=$(get_github_url "https://github.com/mattermost/desktop/" "$(epm print constructname $PKGNAME ".$VERSION*" $arch "deb")")
......
...@@ -8,22 +8,10 @@ URL="https://github.com/minbrowser/min" ...@@ -8,22 +8,10 @@ URL="https://github.com/minbrowser/min"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in
x86_64)
file="min-${VERSION}-amd64.deb"
;;
aarch64)
file="min-${VERSION}-arm64.deb"
;;
armhf)
file="min-${VERSION}-armv7l.deb"
;;
*)
fatal "$arch arch is not supported"
;;
esac
PKGURL="$(eget --list --latest "${URL}"/releases "${file}")" file="min-${VERSION}-${arch}.deb"
PKGURL="$(eget --list --latest "https://github.com/minbrowser/min/releases "$file")"
install_pkgurl install_pkgurl
#!/bin/sh #!/bin/sh
PKGNAME=netbird PKGNAME=netbird
SUPPORTEDARCHES="x86_64 aarch64 i386 armv6l" SUPPORTEDARCHES="x86_64 aarch64 x86 armv6l"
VERSION="$2" VERSION="$2"
DESCRIPTION="Secure WireGuard® overlay network with SSO/MFA." DESCRIPTION="Secure WireGuard® overlay network with SSO/MFA."
URL="https://github.com/netbirdio/netbird" URL="https://github.com/netbirdio/netbird"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in case "$arch" in
x86_64) i386)
arch="amd64"
;;
aarch64)
arch="arm64"
;;
i386 | i686)
arch="386" arch="386"
;; ;;
armv6l | armv7l) armv6l | armv7l)
......
...@@ -8,13 +8,11 @@ URL="https://github.com/Eugeny/tabby" ...@@ -8,13 +8,11 @@ URL="https://github.com/Eugeny/tabby"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
case "$(epm print info -a)" in
arch="$(epm print info --debian-arch)"
case "$arch" in
x86_64) x86_64)
arch="x64" ;; arch="x64" ;;
aarch64)
arch="arm64" ;;
armhf)
arch="armv7l" ;;
esac esac
case "$(epm print info -p)" in case "$(epm print info -p)" in
......
...@@ -10,12 +10,7 @@ URL="https://github.com/Vencord/Vesktop" ...@@ -10,12 +10,7 @@ URL="https://github.com/Vencord/Vesktop"
warn_version_is_not_supported warn_version_is_not_supported
case "$(epm print info -a)" in arch="$(epm print info --debian-arch)"
x86_64)
arch="amd64" ;;
aarch64)
arch="arm64" ;;
esac
PKGURL="https://vencord.dev/download/vesktop/$arch/appimage" PKGURL="https://vencord.dev/download/vesktop/$arch/appimage"
......
#!/bin/sh #!/bin/sh
PKGNAME=WebCord PKGNAME=WebCord
SUPPORTEDARCHES="x86_64 arm64" SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2" VERSION="$2"
DESCRIPTION="A Discord and Spacebar client implemented directly without Discord API from the official github" DESCRIPTION="A Discord and Spacebar client implemented directly without Discord API from the official github"
URL="https://github.com/SpacingBat3/WebCord" URL="https://github.com/SpacingBat3/WebCord"
......
...@@ -8,15 +8,7 @@ URL="https://github.com/Windscribe/Desktop-App" ...@@ -8,15 +8,7 @@ URL="https://github.com/Windscribe/Desktop-App"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in
x86_64)
arch=amd64
;;
aarch64)
arch=arm64
;;
esac
if [ "$VERSION" = "*" ] ; then if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_url "https://github.com/Windscribe/Desktop-App/" "${PKGNAME}_.${VERSION}_$arch.deb") PKGURL=$(get_github_url "https://github.com/Windscribe/Desktop-App/" "${PKGNAME}_.${VERSION}_$arch.deb")
......
...@@ -8,20 +8,11 @@ URL="https://github.com/cucumber-sp/yandex-music-linux/releases" ...@@ -8,20 +8,11 @@ URL="https://github.com/cucumber-sp/yandex-music-linux/releases"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
arch="$(epm print info -a)" arch="$(epm print info --debian-arch)"
case "$arch" in case "$arch" in
x86_64) armv7l)
arch=amd64
;;
aarch64)
arch=arm64
;;
armhf)
arch=armhf arch=armhf
;; ;;
*)
fatal "$arch arch is not supported"
;;
esac esac
PKGURL=$(eget --list --latest https://github.com/cucumber-sp/yandex-music-linux/releases "yandex-music_${VERSION}_${arch}.deb") PKGURL=$(eget --list --latest https://github.com/cucumber-sp/yandex-music-linux/releases "yandex-music_${VERSION}_${arch}.deb")
......
#!/bin/sh #!/bin/sh
PKGNAME=YouTube-Music PKGNAME=YouTube-Music
SUPPORTEDARCHES="x86_64 armv7l aarch64" SUPPORTEDARCHES="x86_64 armhf aarch64"
VERSION="$2" VERSION="$2"
DESCRIPTION="YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)" DESCRIPTION="YouTube Music Desktop App bundled with custom plugins (and built-in ad blocker / downloader)"
URL="https://github.com/th-ch/youtube-music" URL="https://github.com/th-ch/youtube-music"
......
#!/bin/sh #!/bin/sh
PKGNAME=yucca PKGNAME=yucca
SUPPORTEDARCHES="x86_64 armv7l aarch64" SUPPORTEDARCHES="x86_64 armhf aarch64"
VERSION="$2" VERSION="$2"
DESCRIPTION="Simple solution for video surveillance" DESCRIPTION="Simple solution for video surveillance"
URL="https://yucca.app/" URL="https://yucca.app/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
case $(epm print info -a) in arch="$(epm print info --debian-arch)"
x86_64) case "$arch" in
arch=amd64 ;;
armv7l) armv7l)
arch=arm ;; arch=arm ;;
aarch64)
arch=arm64 ;;
*)
fatal "Unsupported arch $arch for $(epm print info -d)"
esac esac
if [ "$VERSION" = "*" ] ; then if [ "$VERSION" = "*" ] ; then
......
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