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

# TODO: common place
fatal()
{
    echo "FATAL: $*" >&2
    exit 1
}

PKGNAME=tamtam-app

if [ "$1" = "--remove" ] ; then
    epm remove $PKGNAME
    exit
fi

17
[ "$1" != "--run" ] && echo "TamTam messenger from the official site" && exit
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

arch="$($DISTRVENDOR --debian-arch)"
case "$arch" in
    amd64)
        ;;
    i386)
        arch=i686
        ;;
    *)
        fatal "Debian $arch arch is not supported"
        ;;
esac

# epm uses eget to download * names
epm install "https://download.tamtam.chat/latest/TamTam-$arch.deb"