Commit 1de6df10 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play teamspeak: fix beta version support

parent 0151ec85
...@@ -3,11 +3,18 @@ ...@@ -3,11 +3,18 @@
TAR="$1" TAR="$1"
RETURNTARNAME="$2" RETURNTARNAME="$2"
VERSION="$3" VERSION="$3"
URL="$4"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
[ "$(basename $TAR)" = "teamspeak-client.tar.gz" ] || fatal "Unsupported $TAR" [ "$(basename $TAR)" = "teamspeak-client.tar.gz" ] || fatal "Unsupported $TAR"
if [ -z "$VERSION" ] ; then
VERSION=$(basename $(dirname "$URL") | sed -e "s|-beta|.beta|")
[ -n "$VERSION" ] || fatal "Can't get version from URL $URL"
fi
erc $TAR || fatal erc $TAR || fatal
mkdir -p opt mkdir -p opt
mv teamspeak-client* opt/TeamSpeak mv teamspeak-client* opt/TeamSpeak
......
...@@ -9,9 +9,10 @@ URL="https://www.teamspeak.com/" ...@@ -9,9 +9,10 @@ URL="https://www.teamspeak.com/"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
if [ "$VERSION" = "*" ] ; then if [ "$VERSION" = "*" ] ; then
VERSION=$(eget -O- https://teamspeak.com/en/downloads/ | grep -oP 'https://files\.teamspeak-services\.com/pre_releases/client/([\.\-beta\d]+)' | head -n 1 | grep -oP '([\.\-beta\d]+)' | tail -n 1) PKGURL="$(eget --list https://teamspeak.com/en/downloads/ teamspeak-client.tar.gz)"
else
VERSION=${VERSION/.beta/-beta}
PKGURL="https://files.teamspeak-services.com/pre_releases/client/$VERSION/teamspeak-client.tar.gz"
fi fi
PKGURL="https://files.teamspeak-services.com/pre_releases/client/$VERSION/teamspeak-client.tar.gz" install_pack_pkgurl
install_pack_pkgurl "$VERSION"
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