File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ YUM_CMD=$( which yum) # yum package manager for RHEL & CentOS
4
+ DNF_CMD=$( which dnf) # dnf package manager for new RHEL & CentOS
5
+ APT_GET_CMD=$( which apt-get) # apt package manager for Ubuntu & other Debian based distributions
6
+ PACMAN_CMD=$( which pacman) # pacman package manager for ArchLinux
7
+ APK_CMD=$( which apk) # apk package manager for Alpine
8
+
9
+ if [ ! -z $APT_GET_CMD ]; then
10
+ wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
11
+ sudo sh -c ' echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
12
+ sudo apt-get update
13
+ sudo apt-get install atom
14
+ elif [ ! -z $DNF_CMD ]; then
15
+ sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey
16
+ sudo sh -c ' echo -e "[Atom]\nname=Atom Editor\nbaseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo'
17
+ sudo dnf install atom
18
+ elif [ ! -z $YUM_CMD ]; then
19
+ sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey
20
+ sudo sh -c ' echo -e "[Atom]\nname=Atom Editor\nbaseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch\nenabled=1\ngpgcheck=0\nrepo_gpgcheck=1\ngpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo'
21
+ sudo dnf install atom
22
+ elif [ ! -z $PACMAN_CMD ]; then
23
+ sudo pacman -S atom
24
+ elif [ ! -z $APK_CMD ]; then
25
+ sudo apk add atom
26
+ else
27
+ echo " Couldn't install package"
28
+ exit 1;
29
+ fi
30
+
31
+ atom --version
You can’t perform that action at this time.
0 commit comments