pantum.sh 859 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 22 23 24 25 26 27 28 29 30 31 32
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)
        PKG="pantum_*_amd64.deb"
        ;;
    x86)
33
        PKG="pantum_*_i386.deb"
34 35 36 37
        ;;
esac

return_tar $PKG