lycheeslicer.sh 1.26 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
#!/bin/sh

PKGNAME=lycheeslicer
SUPPORTEDARCHES="x86_64"
VERSION="$2"
DESCRIPTION="Lychee Slicer - A powerful and versatile Slicer for Resin and Filament 3D Printers from the official site"
URL="https://mango3d.io/downloads/"

. $(dirname $0)/common.sh

# they have broken require on libicu56 (in embedded libQt5 from 2016)
case "$(epm print info -s)" in
    alt)
        epm installed libicu56 || epm play libicu56 || fatal
        ;;
esac

18
is_stdcpp_enough "11.0" || VERSION="4.1.0"
19 20 21 22

PKGURL="$(eget --list --latest https://mango3d.io/downloads/ "LycheeSlicer-$VERSION.deb")"

# restore missed CDN for the latest release
23
PKGURL="$(echo $PKGURL | sed -e 's|mango-lychee.nyc3.digitaloceanspaces.com|mango-lychee.nyc3.cdn.digitaloceanspaces.com|')"
24

25
if ! eget --check-url "$PKGURL" ; then
26 27 28 29 30 31
    # all previous versions return url to cdn with broken SSL (SSL connection broken only with wget or works only in a browser):
    # Connecting to mango-lychee.nyc3.cdn.digitaloceanspaces.com (mango-lychee.nyc3.cdn.digitaloceanspaces.com)|205.185.216.42|:443... connected.
    # Unable to establish SSL connection.
    if epm assure curl ; then
        export EGET_BACKEND=curl
    else
32
        PKGURL="$(echo $PKGURL | sed -e 's|mango-lychee.nyc3.cdn|mango-lychee.nyc3|')"
33 34 35
    fi
fi

36
install_pkgurl