-
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 #36 from Heshdude/update-readme-md-and-installers-…
…toml-#35 Update installer scrits, README.md & installers.toml
- Loading branch information
Showing
4 changed files
with
61 additions
and
0 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 | ||
;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 $CURL_CMD ]; then;info "Downloading eksctl";$SUDO curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp;info "Setting up at /usr/local/bin/eksctl";$SUDO mv /tmp/eksctl /usr/local/bin;$SUDO rm /tmp/eksctl;;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,53 @@ | ||
#!/bin/sh | ||
|
||
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 $CURL_CMD ]; then | ||
info "Downloading eksctl" | ||
$SUDO curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp | ||
info "Setting up at /usr/local/bin/eksctl" | ||
$SUDO mv /tmp/eksctl /usr/local/bin | ||
$SUDO rm /tmp/eksctl | ||
|
||
else | ||
echo "Couldn't install package" | ||
exit 1; | ||
fi |