Merge "Update virtualenv, pip and git existent check in cli-ref tool"

This commit is contained in:
Jenkins 2015-11-13 08:14:45 +00:00 committed by Gerrit Code Review
commit 6e6e39837b

View File

@ -21,20 +21,19 @@ fi
project=$1 project=$1
if [[ ! -e /usr/bin/virtualenv ]]; then # checks command exist or not
echo "error: virtualenv not installed" function does_exist {
exit 1 which $@ > /dev/null 2>&1
fi local status=$?
if [[ $status -ne 0 ]]; then
echo "error: $1 not installed"
exit 1
fi
}
if [[ ! -e /usr/bin/pip ]]; then does_exist virtualenv
echo "error: pip not installed" does_exist pip
exit 1 does_exist git
fi
if [[ ! -e /usr/bin/git ]]; then
echo "error: git not installed"
exit 1
fi
if [[ ! -e $HOME/.gitconfig ]]; then if [[ ! -e $HOME/.gitconfig ]]; then
echo "note: ~/.gitconfig does not exist" echo "note: ~/.gitconfig does not exist"