Commit b71b12ea authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm play: add common-jetbrains.sh and use it

parent bd3a954d
#!/bin/sh
. $(dirname $0)/common.sh
# PS
# Returns URL like https://download.jetbrains.com/python/pycharm-professional-2022.2.1.tar.gz
get_jetbrains_url()
{
CODE="$1"
arch="$(epm print info -a)"
case $arch in
aarch64)
OS=linuxARM64
;;
*)
OS=linux
;;
esac
epm tool eget -O- "https://data.services.jetbrains.com/products/releases?code=$CODE&latest=true&type=release" | epm --inscript tool json -b | \
grep '"'$CODE'",0,"downloads","'$OS'","link"' | sed -e 's|.*[[:space:]]||' | sed -e 's|"||g'
}
# PS python
get_jetbrains_pkgurl()
{
local CODE="$1"
local PART="$2"
if [ "$VERSION" = "*" ] ; then
get_jetbrains_url $CODE
else
echo "https://download-cdn.jetbrains.com/$PART/$PKGNAME-$VERSION.tar.gz"
fi
}
#!/bin/sh
PKGNAME=pycharm-professional
SUPPORTEDARCHES="x86_64"
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="PyCharm Professional — The Python IDE for Professional Developers (Trial)"
. $(dirname $0)/common.sh
. $(dirname $0)/common-jetbrains.sh
#URL="https://download.jetbrains.com/python/pycharm-professional-2022.2.1.tar.gz"
URL=$(epm tool eget -O- "https://data.services.jetbrains.com/products/releases?code=PCP&latest=true&type=release" | epm --inscript tool json -b | grep '"PCP",0,"downloads","linux","link"' | sed -e 's|.*[[:space:]]||' | sed -e 's|"||g')
PKGURL="$(get_jetbrains_pkgurl PCP python)"
epm install "$URL"
epm install "$PKGURL"
#!/bin/sh
PKGNAME=pycharm-community
SUPPORTEDARCHES="x86_64"
SUPPORTEDARCHES="x86_64 aarch64"
VERSION="$2"
DESCRIPTION="PyCharm CE — The Python IDE for Professional Developers"
. $(dirname $0)/common.sh
. $(dirname $0)/common-jetbrains.sh
#URL=https://download.jetbrains.com/python/pycharm-community-2022.2.tar.gz
URL=$(epm tool eget -O- "https://data.services.jetbrains.com/products/releases?code=PCC&latest=true&type=release" | epm --inscript tool json -b | grep '"PCC",0,"downloads","linux","link"' | sed -e 's|.*[[:space:]]||' | sed -e 's|"||g')
PKGURL="$(get_jetbrains_pkgurl PCC python)"
epm install $URL
epm install $PKGURL
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