Skip to content

Commit

Permalink
Merge pull request #47 from Heshdude/update-readme-md-and-installers-…
Browse files Browse the repository at this point in the history
…toml-44

Update installer scripts, README.md & installers.toml for #44
  • Loading branch information
Heshdude authored Aug 16, 2020
2 parents 867d50d + c2ef926 commit a368877
Show file tree
Hide file tree
Showing 12 changed files with 199 additions and 1 deletion.
2 changes: 2 additions & 0 deletions installers/pip3/installer.apk.min.sh
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='';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 py3-pip;;;
37 changes: 37 additions & 0 deletions installers/pip3/installer.apk.sh
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=''
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 py3-pip

2 changes: 2 additions & 0 deletions installers/pip3/installer.apt.min.sh
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='';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 apt-get update;$SUDO apt install python3-pip;;;
38 changes: 38 additions & 0 deletions installers/pip3/installer.apt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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 apt-get update
$SUDO apt install python3-pip

2 changes: 2 additions & 0 deletions installers/pip3/installer.dnf.min.sh
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='';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 dnf install python3-pip;;;
37 changes: 37 additions & 0 deletions installers/pip3/installer.dnf.sh
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=''
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 dnf install python3-pip

2 changes: 1 addition & 1 deletion installers/pip3/installer.min.sh
Original file line number Diff line number Diff line change
@@ -1,2 +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='';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 dnf install python3-pip;;elif [ ! -z $PACMAN_CMD ]; then;pacman -S python-pip;;elif [ ! -z $APT_GET_CMD ]; then;$SUDO apt-get update;$SUDO apt install python3-pip;;elif [ ! -z $APK_CMD ]; then;$SUDO apk add py3-pip;;elif [ ! -z $YUM_CMD ]; then;$SUDO yum install python3-pip;;else echo "Couldn't install package";exit 1;;fi;
;;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 dnf install python3-pip;;elif [ ! -z $PACMAN_CMD ]; then;pacman -S python-pip;;elif [ ! -z $APT_GET_CMD ]; then;$SUDO apt-get update;$SUDO apt install python3-pip;;elif [ ! -z $APK_CMD ]; then;$SUDO apk add py3-pip;;elif [ ! -z $YUM_CMD ]; then;$SUDO yum install python3-pip;;else echo "Couldn't install package";exit 1;;fi;
2 changes: 2 additions & 0 deletions installers/pip3/installer.pacman.min.sh
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='';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"; };;pacman -S python-pip;;;
37 changes: 37 additions & 0 deletions installers/pip3/installer.pacman.sh
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=''
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"
}

pacman -S python-pip

2 changes: 2 additions & 0 deletions installers/pip3/installer.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#!/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)"
Expand Down
2 changes: 2 additions & 0 deletions installers/pip3/installer.yum.min.sh
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='';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 yum install python3-pip;;;
37 changes: 37 additions & 0 deletions installers/pip3/installer.yum.sh
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=''
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 yum install python3-pip

0 comments on commit a368877

Please sign in to comment.