Skip to content

Commit 552b1f2

Browse files
Added new installer script 'python3'
1 parent 51ccfd6 commit 552b1f2

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

installers/python3/installer.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/sh
2+
3+
YUM_CMD=$(which yum) # yum package manager for RHEL & CentOS
4+
DNF_CMD=$(which dnf) # dnf package manager for new RHEL & CentOS
5+
APT_GET_CMD=$(which apt-get) # apt package manager for Ubuntu & other Debian based distributions
6+
PACMAN_CMD=$(which pacman) # pacman package manager for ArchLinux
7+
APK_CMD=$(which apk) # apk package manager for Alpine
8+
9+
if [ ! -z $APT_GET_CMD ]; then
10+
sudo apt-get update
11+
sudo apt-get install python3
12+
elif [ ! -z $DNF_CMD ]; then
13+
sudo dnf install python3
14+
elif [ ! -z $YUM_CMD ]; then
15+
sudo yum install python3
16+
elif [ ! -z $PACMAN_CMD ]; then
17+
pacman -Sy python3
18+
elif [ ! -z $APK_CMD ]; then
19+
sudo apk add python3
20+
else
21+
echo "Couldn't install package"
22+
exit 1;
23+
fi
24+
25+
python3 --version

0 commit comments

Comments
 (0)