-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from Heshdude/update-readme-md-and-installers-…
…toml-50 Update installer scripts, README.md & installers.toml for #50
- Loading branch information
Showing
14 changed files
with
299 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;$SUDO apk add atom;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
SUDO_CMD=$(which sudo) | ||
|
||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
$SUDO apk add atom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | $SUDO apt-key add -;$SUDO sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list';$SUDO apt-get update;$SUDO apt-get install atom;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/bin/sh | ||
|
||
SUDO_CMD=$(which sudo) | ||
|
||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | $SUDO apt-key add - | ||
$SUDO sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list' | ||
$SUDO apt-get update | ||
$SUDO apt-get install atom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;$SUDO sh -c 'echo -e "[Atom];name=Atom Editor;baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch;enabled=1;gpgcheck=0;repo_gpgcheck=1;gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';$SUDO dnf install atom;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
|
||
SUDO_CMD=$(which sudo) | ||
|
||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
$SUDO sh -c 'echo -e "[Atom] | ||
name=Atom Editor | ||
baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch | ||
enabled=1 | ||
gpgcheck=0 | ||
repo_gpgcheck=1 | ||
gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo' | ||
$SUDO dnf install atom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/bin/sh | ||
;YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS;DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS;APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions;PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux;APK_CMD=$(which apk) # apk package manager for Alpine;;if [ ! -z $APT_GET_CMD ]; then;wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -;sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list';sudo apt-get update;sudo apt-get install atom;elif [ ! -z $DNF_CMD ]; then;sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;sudo sh -c 'echo -e "[Atom]; name=Atom Editor; baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch; enabled=1; gpgcheck=0; repo_gpgcheck=1; gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';sudo dnf install atom;elif [ ! -z $YUM_CMD ]; then;sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;sudo sh -c 'echo -e "[Atom]; name=Atom Editor; baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch; enabled=1; gpgcheck=0; repo_gpgcheck=1; gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';sudo dnf install atom;elif [ ! -z $PACMAN_CMD ]; then;sudo pacman -S atom;elif [ ! -z $APK_CMD ]; then;sudo apk add atom;else echo "Couldn't install package";exit 1;;fi;;atom --version;; | ||
;;CURL_CMD=$(which curl);YUM_CMD=$(which yum);DNF_CMD=$(which dnf);APT_GET_CMD=$(which apt-get);PACMAN_CMD=$(which pacman);APK_CMD=$(which apk);GIT_CMD=$(which git);;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;if [ ! -z $DNF_CMD ]; then;$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;$SUDO sh -c 'echo -e "[Atom];name=Atom Editor;baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch;enabled=1;gpgcheck=0;repo_gpgcheck=1;gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';$SUDO dnf install atom;;elif [ ! -z $PACMAN_CMD ]; then;$SUDO pacman -S atom;;elif [ ! -z $APT_GET_CMD ]; then;wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | $SUDO apt-key add -;$SUDO sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list';$SUDO apt-get update;$SUDO apt-get install atom;;elif [ ! -z $APK_CMD ]; then;$SUDO apk add atom;;elif [ ! -z $YUM_CMD ]; then;$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;$SUDO sh -c 'echo -e "[Atom];name=Atom Editor;baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch;enabled=1;gpgcheck=0;repo_gpgcheck=1;gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';$SUDO dnf install atom;;else echo "Couldn't install package";exit 1;;fi; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;$SUDO pacman -S atom;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
SUDO_CMD=$(which sudo) | ||
|
||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
$SUDO pacman -S atom | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,82 @@ | ||
#!/bin/sh | ||
|
||
|
||
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS | ||
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS | ||
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions | ||
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux | ||
APK_CMD=$(which apk) # apk package manager for Alpine | ||
CURL_CMD=$(which curl) | ||
YUM_CMD=$(which yum) | ||
DNF_CMD=$(which dnf) | ||
APT_GET_CMD=$(which apt-get) | ||
PACMAN_CMD=$(which pacman) | ||
APK_CMD=$(which apk) | ||
GIT_CMD=$(which git) | ||
|
||
if [ ! -z $APT_GET_CMD ]; then | ||
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add - | ||
sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list' | ||
sudo apt-get update | ||
sudo apt-get install atom | ||
elif [ ! -z $DNF_CMD ]; then | ||
sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
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' | ||
sudo dnf install atom | ||
elif [ ! -z $YUM_CMD ]; then | ||
sudo rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
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' | ||
sudo dnf install atom | ||
elif [ ! -z $PACMAN_CMD ]; then | ||
sudo pacman -S atom | ||
elif [ ! -z $APK_CMD ]; then | ||
sudo apk add atom | ||
else | ||
echo "Couldn't install package" | ||
exit 1; | ||
fi | ||
SUDO_CMD=$(which sudo) | ||
|
||
atom --version | ||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
if [ ! -z $DNF_CMD ]; then | ||
$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
$SUDO sh -c 'echo -e "[Atom] | ||
name=Atom Editor | ||
baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch | ||
enabled=1 | ||
gpgcheck=0 | ||
repo_gpgcheck=1 | ||
gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo' | ||
$SUDO dnf install atom | ||
|
||
elif [ ! -z $PACMAN_CMD ]; then | ||
$SUDO pacman -S atom | ||
|
||
elif [ ! -z $APT_GET_CMD ]; then | ||
wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | $SUDO apt-key add - | ||
$SUDO sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list' | ||
$SUDO apt-get update | ||
$SUDO apt-get install atom | ||
|
||
elif [ ! -z $APK_CMD ]; then | ||
$SUDO apk add atom | ||
|
||
elif [ ! -z $YUM_CMD ]; then | ||
$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
$SUDO sh -c 'echo -e "[Atom] | ||
name=Atom Editor | ||
baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch | ||
enabled=1 | ||
gpgcheck=0 | ||
repo_gpgcheck=1 | ||
gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo' | ||
$SUDO dnf install atom | ||
|
||
else | ||
echo "Couldn't install package" | ||
exit 1; | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
;SUDO_CMD=$(which sudo);;USER="$(id -un 2>/dev/null || true)";SUDO='';if [ "$USER" != 'root' ]; then;if [ ! -z $SUDO_CMD ]; then;SUDO='sudo';else cat >&2 <<-'EOF';Error: this installer needs the ability to run commands as root.;We are unable to find "sudo". Make sure its available to make this happen;EOF;exit 1;fi;fi;;RESET='[0m';RED='[0;31m';GREEN='[0;32m';YELLOW='[0;33m';log () { echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"; };info () { log "$GREEN INFO$RESET $1"; };warn () { log "$YELLOW WARN$RESET $1"; };error () { log "$RED ERROR$RESET $1"; };;$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey;$SUDO sh -c 'echo -e "[Atom];name=Atom Editor;baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch;enabled=1;gpgcheck=0;repo_gpgcheck=1;gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo';$SUDO dnf install atom;;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/bin/sh | ||
|
||
SUDO_CMD=$(which sudo) | ||
|
||
USER="$(id -un 2>/dev/null || true)" | ||
SUDO='' | ||
if [ "$USER" != 'root' ]; then | ||
if [ ! -z $SUDO_CMD ]; then | ||
SUDO='sudo' | ||
else | ||
cat >&2 <<-'EOF' | ||
Error: this installer needs the ability to run commands as root. | ||
We are unable to find "sudo". Make sure its available to make this happen | ||
EOF | ||
exit 1 | ||
fi | ||
fi | ||
|
||
RESET='[0m' | ||
RED='[0;31m' | ||
GREEN='[0;32m' | ||
YELLOW='[0;33m' | ||
log () { | ||
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2" | ||
} | ||
info () { | ||
log "$GREEN INFO$RESET $1" | ||
} | ||
warn () { | ||
log "$YELLOW WARN$RESET $1" | ||
} | ||
error () { | ||
log "$RED ERROR$RESET $1" | ||
} | ||
|
||
$SUDO rpm --import https://packagecloud.io/AtomEditor/atom/gpgkey | ||
$SUDO sh -c 'echo -e "[Atom] | ||
name=Atom Editor | ||
baseurl=https://packagecloud.io/AtomEditor/atom/el/7/\$basearch | ||
enabled=1 | ||
gpgcheck=0 | ||
repo_gpgcheck=1 | ||
gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey" > /etc/yum.repos.d/atom.repo' | ||
$SUDO dnf install atom | ||
|