wing.sh 1019 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/sh

PKGNAME=wing-personal10
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Wing Python IDE Personal from the official site"
URL="https://wingware.com/"

. $(dirname $0)/common.sh

# https://wingware.com/pub/wing-personal/10.0.2.0/wing-personal10_10.0.2-0_amd64.deb
# https://wingware.com/pub/wing-personal/10.0.2.0/wing-personal10-10.0.2-0.x86_64.rpm

BASEURL="https://wingware.com/pub/wing-personal"

if [ "$VERSION" = "*" ] ; then
17
    DIRVERSION="$(eget --list --latest "$BASEURL/10.*" | xargs basename)"
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
    VERSION="$(echo $DIRVERSION | sed -e 's|\.[0-9]$||')"
else
    # TODO: get full version from site
    DIRVERSION=$VERSION.0
fi

arch=$(epm print info --distro-arch)

pkgtype=$(epm print info -p)
case $pkgtype in
    rpm)
        mask="$PKGNAME-${VERSION}-*.$arch.rpm"
        ;;
    deb)
        mask="${PKGNAME}_${VERSION}-*_$arch.deb"
        ;;
esac

36
PKGURL="$(eget --list --latest $BASEURL/$DIRVERSION/ "$mask")"
37 38
#PKGURL="https://wingware.com/pub/wing-personal/$VERSION/$mask"

39
install_pkgurl