From 07fb73a94bd1239da21dcf50d54d4474d8f54039 Mon Sep 17 00:00:00 2001 From: Heshdude Date: Sun, 16 Aug 2020 12:12:57 +0000 Subject: [PATCH] Update installer scripts, README.md & installers.toml --- README.md | 1 + installers.toml | 5 ++ installers/atom/installer.apk.min.sh | 2 + installers/atom/installer.apk.sh | 37 +++++++++ installers/atom/installer.apt.min.sh | 2 + installers/atom/installer.apt.sh | 40 +++++++++ installers/atom/installer.dnf.min.sh | 2 + installers/atom/installer.dnf.sh | 45 ++++++++++ installers/atom/installer.min.sh | 2 +- installers/atom/installer.pacman.min.sh | 2 + installers/atom/installer.pacman.sh | 37 +++++++++ installers/atom/installer.sh | 105 ++++++++++++++++++------ installers/atom/installer.yum.min.sh | 2 + installers/atom/installer.yum.sh | 45 ++++++++++ 14 files changed, 299 insertions(+), 28 deletions(-) create mode 100644 installers/atom/installer.apk.min.sh create mode 100644 installers/atom/installer.apk.sh create mode 100644 installers/atom/installer.apt.min.sh create mode 100644 installers/atom/installer.apt.sh create mode 100644 installers/atom/installer.dnf.min.sh create mode 100644 installers/atom/installer.dnf.sh create mode 100644 installers/atom/installer.pacman.min.sh create mode 100644 installers/atom/installer.pacman.sh create mode 100644 installers/atom/installer.yum.min.sh create mode 100644 installers/atom/installer.yum.sh diff --git a/README.md b/README.md index c47aa6c..648265d 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,7 @@ This will install Git on your machine! |Pip3 |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/pip3 | |gCloud |No |No |No |No |No |Yes |https://installer.to/gcloud | |Nginx |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/nginx | +|Atom |Yes|Yes|Yes |Yes|Yes|No |https://installer.to/atom | |Helm |No |No |No |No |No |Yes |https://installer.to/helm | |Fabric |No |No |No |No |No |Yes |https://installer.to/hlf | |Docker |Yes|Yes|No |No |No |No |https://installer.to/docker | diff --git a/installers.toml b/installers.toml index 058541a..81366c2 100644 --- a/installers.toml +++ b/installers.toml @@ -28,6 +28,11 @@ installers = "dnf,pacman,apt,apk,yum" name = "Nginx" description = "Nginx server" +[atom] +installers = "dnf,pacman,apt,apk,yum" +name = "Atom" +description = "A hackable text editor for the 21st Century" + [helm] installers = "curl" name = "Helm" diff --git a/installers/atom/installer.apk.min.sh b/installers/atom/installer.apk.min.sh new file mode 100644 index 0000000..a7cc005 --- /dev/null +++ b/installers/atom/installer.apk.min.sh @@ -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='';RED='';GREEN='';YELLOW='';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;;; \ No newline at end of file diff --git a/installers/atom/installer.apk.sh b/installers/atom/installer.apk.sh new file mode 100644 index 0000000..2fcd376 --- /dev/null +++ b/installers/atom/installer.apk.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 + diff --git a/installers/atom/installer.apt.min.sh b/installers/atom/installer.apt.min.sh new file mode 100644 index 0000000..dd5c396 --- /dev/null +++ b/installers/atom/installer.apt.min.sh @@ -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='';RED='';GREEN='';YELLOW='';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;;; \ No newline at end of file diff --git a/installers/atom/installer.apt.sh b/installers/atom/installer.apt.sh new file mode 100644 index 0000000..6bcf552 --- /dev/null +++ b/installers/atom/installer.apt.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 + diff --git a/installers/atom/installer.dnf.min.sh b/installers/atom/installer.dnf.min.sh new file mode 100644 index 0000000..a698c50 --- /dev/null +++ b/installers/atom/installer.dnf.min.sh @@ -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='';RED='';GREEN='';YELLOW='';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;;; \ No newline at end of file diff --git a/installers/atom/installer.dnf.sh b/installers/atom/installer.dnf.sh new file mode 100644 index 0000000..df2012e --- /dev/null +++ b/installers/atom/installer.dnf.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 + diff --git a/installers/atom/installer.min.sh b/installers/atom/installer.min.sh index 59d0702..204135c 100644 --- a/installers/atom/installer.min.sh +++ b/installers/atom/installer.min.sh @@ -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;; \ No newline at end of file +;;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='';RED='';GREEN='';YELLOW='';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; \ No newline at end of file diff --git a/installers/atom/installer.pacman.min.sh b/installers/atom/installer.pacman.min.sh new file mode 100644 index 0000000..8735873 --- /dev/null +++ b/installers/atom/installer.pacman.min.sh @@ -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='';RED='';GREEN='';YELLOW='';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;;; \ No newline at end of file diff --git a/installers/atom/installer.pacman.sh b/installers/atom/installer.pacman.sh new file mode 100644 index 0000000..67631f9 --- /dev/null +++ b/installers/atom/installer.pacman.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 + diff --git a/installers/atom/installer.sh b/installers/atom/installer.sh index 02b24cb..b19e0bf 100644 --- a/installers/atom/installer.sh +++ b/installers/atom/installer.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 \ No newline at end of file diff --git a/installers/atom/installer.yum.min.sh b/installers/atom/installer.yum.min.sh new file mode 100644 index 0000000..a698c50 --- /dev/null +++ b/installers/atom/installer.yum.min.sh @@ -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='';RED='';GREEN='';YELLOW='';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;;; \ No newline at end of file diff --git a/installers/atom/installer.yum.sh b/installers/atom/installer.yum.sh new file mode 100644 index 0000000..df2012e --- /dev/null +++ b/installers/atom/installer.yum.sh @@ -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='' +RED='' +GREEN='' +YELLOW='' +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 +