geogebra.sh 801 Bytes
Newer Older
1 2
#!/bin/sh

3
PKGNAME=geogebra-classic
4
SUPPORTEDARCHES="x86_64 x86"
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
DESCRIPTION="Geogebra 6 from the official site"

. $(dirname $0)/common.sh

arch=$($DISTRVENDOR --distro-arch)
case $arch in
    x86_64|amd64)
        arch=$arch ;;
    i686|i586|i386)
        arch=i386 ;;
    *)
        fatal "Unsupported arch $arch for $($DISTRVENDOR -d)"
esac

pkgtype="$($DISTRVENDOR -p)"

repack=''
22
[ "$($DISTRVENDOR -s)" = "alt" ] && repack='--repack'
23 24 25

case $pkgtype in
    deb)
26
        epm install "http://www.geogebra.net/linux/pool/main/g/geogebra-classic/(epm print constructname $PKGNAME "*" $arch)"
27 28
        ;;
    rpm)
29
        epm $repack install "http://www.geogebra.net/linux/rpm/$arch/$(epm print constructname $PKGNAME "*" $arch)"
30 31 32 33 34
        ;;
    *)
        fatal "Unsupported $pkgtype"
        ;;
esac
35