pantum.sh 1016 Bytes
Newer Older
1 2 3 4 5 6 7
#!/bin/sh

TAR="$1"
RETURNTARNAME="$2"

. $(dirname $0)/common.sh

8 9
# epm replaces spaces with - in downloaded files
if echo "$TAR" | grep -q "Pantum[ -]Ubuntu[ -]Driver[- ]V.*.zip" ; then
10
    erc "$TAR" || fatal
11
elif echo "$TAR" | grep -q "Pantum%20Ubuntu%20Driver%20V.*.zip" ; then
12
    erc "$TAR" || fatal
13
elif echo "$TAR" | grep -q "linux_pantum.7z" ; then
14 15
    erc "$TAR" || fatal
    return_tar linux_pantum.deb
16 17 18
elif echo "$TAR" | grep -q "pantum.*astra.*_amd64.zip" ; then
    erc "$TAR" || fatal
    return_tar pantum_*_amd64.deb
19 20 21
# from Astra disk: Pantum_Ubuntu_Driver_V1.1.5.tar.gz
elif echo "$TAR" | grep -q "Pantum_Ubuntu_Driver_V.*.tar.gz" ; then
    erc "$TAR" || fatal
22 23 24 25 26 27 28 29 30 31
else
    fatal "We support only Pantum Ubuntu Driver V.*.zip"
fi

# drop dirname with spaces
mv Pantum* PantumDriver || fatal
cd PantumDriver/Resources || fatal

case "$(epm print info -a)" in
    x86_64)
32
        PKG="pantum[-_]*[-_]amd64.deb"
33 34
        ;;
    x86)
35
        PKG="pantum[-_]*[-_]i386.deb"
36 37 38 39
        ;;
esac

return_tar $PKG