Skip to content

Commit aeb952d

Browse files
committed
[#1] Add git installer script
1 parent dbf0785 commit aeb952d

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

installers/git/installer.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/sh
2+
3+
YUM_CMD=$(which yum)
4+
APT_GET_CMD=$(which apt-get)
5+
DNF_CMD=$(which dnf)
6+
7+
if [ ! -z $APT_GET_CMD ]; then
8+
sudo apt-get update
9+
sudo apt-get install git
10+
elif [ ! -z $DNF_CMD ]; then
11+
sudo dnf install git
12+
elif [ ! -z $YUM_CMD ]; then
13+
sudo yum install git
14+
else
15+
echo "error can't install package"
16+
exit 1;
17+
fi
18+
19+
git --version

0 commit comments

Comments
 (0)