Commit 2ee14eb5 authored by Boris Yumankulov's avatar Boris Yumankulov Committed by Vitaly Lipatov

epm play common: rename get_github_version to get_github_url

parent 9bf79c96
......@@ -170,7 +170,7 @@ get_latest_version()
done
}
get_github_version()
get_github_url()
{
local url="$1"
local user_and_repo=${url#https://github.com/}
......
......@@ -9,7 +9,7 @@ URL="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/" "${PKGNAME}-.${VERSION}.AppImage")
PKGURL=$(get_github_url "https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/" "${PKGNAME}-.${VERSION}.AppImage")
else
PKGURL="https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher/releases/download/v$VERSION/${PKGNAME}-${VERSION}.AppImage"
fi
......
......@@ -18,7 +18,7 @@ case "$(epm print info -a)" in
esac
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/mifi/lossless-cut/" "LosslessCut-linux-$arch.tar.bz2")
PKGURL=$(get_github_url "https://github.com/mifi/lossless-cut/" "LosslessCut-linux-$arch.tar.bz2")
else
PKGURL="https://github.com/mifi/lossless-cut/releases/download/v$VERSION/LosslessCut-linux-$arch.tar.bz2"
fi
......
......@@ -21,7 +21,7 @@ case "$arch" in
;;
esac
PKGURL=$(get_github_version "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")")
install_pkgurl
......@@ -9,7 +9,7 @@ URL="https://moonlight-stream.org/"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/moonlight-stream/moonlight-qt/" "$PKGNAME-.$VERSION-x86_64.AppImage")
PKGURL=$(get_github_url "https://github.com/moonlight-stream/moonlight-qt/" "$PKGNAME-.$VERSION-x86_64.AppImage")
else
PKGURL="https://github.com/moonlight-stream/moonlight-qt/releases/download/v$VERSION/$PKGNAME-$VERSION-x86_64.AppImage"
fi
......
......@@ -27,7 +27,7 @@ else
fi
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/cyanfish/naps2/" "$PKGNAME-.$VERSION-linux-$arch.$pkgtype")
PKGURL=$(get_github_url "https://github.com/cyanfish/naps2/" "$PKGNAME-.$VERSION-linux-$arch.$pkgtype")
else
PKGURL="https://github.com/cyanfish/naps2/releases/download/v$VERSION/$PKGNAME-$VERSION-linux-$arch.$pkgtype"
fi
......
......@@ -9,7 +9,7 @@ URL="https://persepolisdm.github.io/"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/persepolisdm/persepolis/" "${PKGNAME}_.${VERSION}_all.deb")
PKGURL=$(get_github_url "https://github.com/persepolisdm/persepolis/" "${PKGNAME}_.${VERSION}_all.deb")
else
PKGURL="https://github.com/persepolisdm/persepolis/releases/download/$VERSION/${PKGNAME}_${VERSION}_all.deb"
fi
......
......@@ -23,9 +23,9 @@ case $pkgtype in
esac
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/SchildiChat/schildichat-desktop/" "$mask")
PKGURL=$(get_github_url "https://github.com/SchildiChat/schildichat-desktop/" "$mask")
else
# need because get_github_version doesn't support ${VERSION} without a dot before VERSION in mask
# need because get_github_url doesn't support ${VERSION} without a dot before VERSION in mask
direct_mask="$(echo $mask | sed 's/\.//')"
PKGURL="https://github.com/SchildiChat/schildichat-desktop/releases/download/v$VERSION/$direct_mask"
fi
......
......@@ -20,7 +20,7 @@ case "$(epm print info -a)" in
esac
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/Automattic/simplenote-electron/" "$PKGNAME-.$VERSION-$arch.AppImage")
PKGURL=$(get_github_url "https://github.com/Automattic/simplenote-electron/" "$PKGNAME-.$VERSION-$arch.AppImage")
else
PKGURL="https://github.com/Automattic/simplenote-electron/releases/download/v$VERSION/$PKGNAME-$VERSION-$arch.AppImage"
fi
......
......@@ -8,7 +8,7 @@ URL="https://app.lizardbyte.dev/Sunshine"
. $(dirname $0)/common.sh
PKGURL=$(get_github_version "https://github.com/LizardByte/Sunshine/" "sunshine-fedora-.*-amd64.rpm")
PKGURL=$(get_github_url "https://github.com/LizardByte/Sunshine/" "sunshine-fedora-.*-amd64.rpm")
install_pkgurl
......
......@@ -9,7 +9,7 @@ URL="https://github.com/tsukinaha/tsukimi"
. $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/tsukinaha/tsukimi/" "tsukimi-x86_64-linux-gnu.tar.gz")
PKGURL=$(get_github_url "https://github.com/tsukinaha/tsukimi/" "tsukimi-x86_64-linux-gnu.tar.gz")
else
PKGURL="https://github.com/tsukinaha/tsukimi/releases/download/v$VERSION/tsukimi-x86_64-linux-gnu.tar.gz"
fi
......
......@@ -21,7 +21,7 @@ case "$arch" in
esac
if [ "$VERSION" = "*" ] ; then
PKGURL=$(get_github_version "https://github.com/zed-industries/zed/" "zed-linux-$arch.tar.gz")
PKGURL=$(get_github_url "https://github.com/zed-industries/zed/" "zed-linux-$arch.tar.gz")
else
PKGURL="https://github.com/zed-industries/zed/releases/download/v$VERSION/zed-linux-$arch.tar.gz"
fi
......
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