Skip to content

Commit 4d69f54

Browse files
author
lerndevops
authored
Update installGit.sh
1 parent 3356e2e commit 4d69f54

File tree

1 file changed

+7
-16
lines changed

1 file changed

+7
-16
lines changed

git/installGit.sh

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,9 @@
11
#!/bin/bash
22

3-
which git
4-
5-
if [ $? -eq "0" ];then
6-
echo "`git --version` - is already installed on `hostname`"
7-
exit
8-
else
9-
echo "No git installation found -- proceeding with git installation..."
10-
sudo apt-get install -y python-software-properties
11-
sudo apt-get install -y software-properties-common
12-
sudo apt-get remove -y git git-core
13-
sudo apt-add-repository --yes ppa:git-core/ppa
14-
sudo apt-get update
15-
sudo apt-get install -y git
16-
echo "`git --version` installed Successfully"
17-
fi
18-
exit
3+
sudo apt-get install -y python-software-properties
4+
sudo apt-get install -y software-properties-common
5+
sudo apt-get remove -y git git-core
6+
sudo apt-add-repository --yes ppa:git-core/ppa
7+
sudo apt-get update
8+
sudo apt-get install -y git
9+
echo "`git --version` installed Successfully"

0 commit comments

Comments
 (0)