atom.sh 773 Bytes
Newer Older
1 2
#!/bin/sh

3
PKGNAME=atom
4
SUPPORTEDARCHES="x86_64"
5
VERSION="$2"
6
PRODUCTALT="'' beta"
7 8 9 10
#DESCRIPTION="The hackable text editor from the official site"
# official sunset on December 15, 2022.
DESCRIPTION=''
URL="https://github.blog/2022-06-08-sunsetting-atom/"
11

12
. $(dirname $0)/common.sh
13

14 15
#arch=$(epm print info --distro-arch)
#pkgtype=$(epm print info -p)
16 17 18
arch=amd64
pkgtype=deb

19 20 21 22 23
notbeta=''
if [ "$PKGNAME" = "atom" ] ; then
    notbeta='-v'
fi

24 25 26 27
if [ "$VERSION" != "*" ] ; then
    [ "$PKGNAME" = "atom-beta" ] && VERSION="$VERSION-beta0"
    PKGURL="https://github.com/atom/atom/releases/download/v$VERSION/atom-$arch.$pkgtype"
else
28
    PKGURL=$(eget --list https://github.com/atom/atom/releases/ "atom-$arch.$pkgtype" | grep $notbeta -- "-beta" | head -n1)
29
fi
30

31
install_pkgurl