Skip to content

Commit a368877

Browse files
authored
Merge pull request #47 from Heshdude/update-readme-md-and-installers-toml-44
Update installer scripts, README.md & installers.toml for #44
2 parents 867d50d + c2ef926 commit a368877

12 files changed

+199
-1
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
;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;;;

installers/pip3/installer.apk.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
SUDO_CMD=$(which sudo)
4+
5+
USER="$(id -un 2>/dev/null || true)"
6+
SUDO=''
7+
if [ "$USER" != 'root' ]; then
8+
if [ ! -z $SUDO_CMD ]; then
9+
SUDO='sudo'
10+
else
11+
cat >&2 <<-'EOF'
12+
Error: this installer needs the ability to run commands as root.
13+
We are unable to find "sudo". Make sure its available to make this happen
14+
EOF
15+
exit 1
16+
fi
17+
fi
18+
19+
RESET=''
20+
RED=''
21+
GREEN=''
22+
YELLOW=''
23+
log () {
24+
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"
25+
}
26+
info () {
27+
log "$GREEN INFO$RESET $1"
28+
}
29+
warn () {
30+
log "$YELLOW WARN$RESET $1"
31+
}
32+
error () {
33+
log "$RED ERROR$RESET $1"
34+
}
35+
36+
$SUDO apk add py3-pip
37+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
;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;;;

installers/pip3/installer.apt.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/sh
2+
3+
SUDO_CMD=$(which sudo)
4+
5+
USER="$(id -un 2>/dev/null || true)"
6+
SUDO=''
7+
if [ "$USER" != 'root' ]; then
8+
if [ ! -z $SUDO_CMD ]; then
9+
SUDO='sudo'
10+
else
11+
cat >&2 <<-'EOF'
12+
Error: this installer needs the ability to run commands as root.
13+
We are unable to find "sudo". Make sure its available to make this happen
14+
EOF
15+
exit 1
16+
fi
17+
fi
18+
19+
RESET=''
20+
RED=''
21+
GREEN=''
22+
YELLOW=''
23+
log () {
24+
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"
25+
}
26+
info () {
27+
log "$GREEN INFO$RESET $1"
28+
}
29+
warn () {
30+
log "$YELLOW WARN$RESET $1"
31+
}
32+
error () {
33+
log "$RED ERROR$RESET $1"
34+
}
35+
36+
$SUDO apt-get update
37+
$SUDO apt install python3-pip
38+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
;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;;;

installers/pip3/installer.dnf.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
SUDO_CMD=$(which sudo)
4+
5+
USER="$(id -un 2>/dev/null || true)"
6+
SUDO=''
7+
if [ "$USER" != 'root' ]; then
8+
if [ ! -z $SUDO_CMD ]; then
9+
SUDO='sudo'
10+
else
11+
cat >&2 <<-'EOF'
12+
Error: this installer needs the ability to run commands as root.
13+
We are unable to find "sudo". Make sure its available to make this happen
14+
EOF
15+
exit 1
16+
fi
17+
fi
18+
19+
RESET=''
20+
RED=''
21+
GREEN=''
22+
YELLOW=''
23+
log () {
24+
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"
25+
}
26+
info () {
27+
log "$GREEN INFO$RESET $1"
28+
}
29+
warn () {
30+
log "$YELLOW WARN$RESET $1"
31+
}
32+
error () {
33+
log "$RED ERROR$RESET $1"
34+
}
35+
36+
$SUDO dnf install python3-pip
37+

installers/pip3/installer.min.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/bin/sh
2-
;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+
;;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;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/sh
2+
;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;;;
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#!/bin/sh
2+
3+
SUDO_CMD=$(which sudo)
4+
5+
USER="$(id -un 2>/dev/null || true)"
6+
SUDO=''
7+
if [ "$USER" != 'root' ]; then
8+
if [ ! -z $SUDO_CMD ]; then
9+
SUDO='sudo'
10+
else
11+
cat >&2 <<-'EOF'
12+
Error: this installer needs the ability to run commands as root.
13+
We are unable to find "sudo". Make sure its available to make this happen
14+
EOF
15+
exit 1
16+
fi
17+
fi
18+
19+
RESET=''
20+
RED=''
21+
GREEN=''
22+
YELLOW=''
23+
log () {
24+
echo "[`date "+%Y.%m.%d-%H:%M:%S%Z"`]$1 $2"
25+
}
26+
info () {
27+
log "$GREEN INFO$RESET $1"
28+
}
29+
warn () {
30+
log "$YELLOW WARN$RESET $1"
31+
}
32+
error () {
33+
log "$RED ERROR$RESET $1"
34+
}
35+
36+
pacman -S python-pip
37+

installers/pip3/installer.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
#!/bin/sh
22

3+
34
CURL_CMD=$(which curl)
45
YUM_CMD=$(which yum)
56
DNF_CMD=$(which dnf)
67
APT_GET_CMD=$(which apt-get)
78
PACMAN_CMD=$(which pacman)
89
APK_CMD=$(which apk)
910
GIT_CMD=$(which git)
11+
1012
SUDO_CMD=$(which sudo)
1113

1214
USER="$(id -un 2>/dev/null || true)"

0 commit comments

Comments
 (0)