You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
369 B
Bash
28 lines
369 B
Bash
#! /bin/shell
|
|
|
|
hasGit(){
|
|
GIT_VERSION=$(git --version)
|
|
echo "${GIT_VERSION}"
|
|
if [[ $GIT_VERSION == *version* ]]
|
|
then
|
|
return 1;
|
|
fi
|
|
return 0;
|
|
}
|
|
|
|
hasGit
|
|
|
|
if [ $? != 1 ]
|
|
then
|
|
echo "Not Found git"
|
|
echo "Installing Git..."
|
|
yum install -y git
|
|
hasGit
|
|
if [ $? != 1 ]
|
|
then
|
|
echo "Install maven Fail"
|
|
fi
|
|
fi
|
|
|
|
echo ""
|