rstudio.sh 1.04 KB
Newer Older
1 2 3 4
#!/bin/sh

PKGNAME=rstudio
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6 7 8 9 10
DESCRIPTION='RStudio from the official site'

. $(dirname $0)/common.sh

arch=x86_64
11 12 13 14 15 16 17 18 19 20 21 22 23
pkgtype=$(epm print info -p)
repack=''

case $(epm print info -e) in
    Ubuntu/22*|Ubuntu/23*)
        PKGFILTER="jammy"
        ;;
    AstraLinux*|Debian/*|Ubuntu/*)
        PKGFILTER="bionic"
        ;;
    RedOS/7*|AlterOS/*|Fedora/19)
        PKGFILTER="centos7"
        ;;
24 25 26
    ROSA/*)
        PKGFILTER="rhel8"
        ;;
27 28 29 30 31 32
    CentOS/*|Fedora/34|Fedora/35|RHEL/8)
        PKGFILTER="rhel8"
        ;;
    Fedora/*|RHEL/9)
        PKGFILTER="rhel9"
        ;;
33
    ALTLinux/*)
34 35 36 37 38 39 40
        PKGFILTER="rhel8"
        repack='--repack'
        ;;
    *)
        fatal "Unsupported distro $(epm print info -e). Ask application vendor for a support."
        ;;
esac
41

42 43
PKGMASK="$(epm print constructname $PKGNAME "$VERSION" $arch $pkgtype "-" "-")"
PKGURL="$(epm tool eget --list https://www.rstudio.com/products/rstudio/download/ $PKGMASK | grep $PKGFILTER)" || fatal "Can't get package URL"
44

45
epm install $repack "$PKGURL"