Use exists function for deploy_linux.sh.

This commit is contained in:
Daniel Goldberg 2020-01-16 19:54:02 +02:00
parent 5c7cc5117a
commit 9493cad5e6
1 changed files with 6 additions and 3 deletions

View File

@ -40,13 +40,16 @@ if [[ ! -d ${monkey_home} ]]; then
mkdir -p ${monkey_home}
fi
git --version &>/dev/null
git_available=$?
if [[ ${git_available} != 0 ]]; then
if ! exists git; then
echo "Please install git and re-run this script"
exit 1
fi
if ! exists wget; then
echo 'Your system does have wget, please install and re-run this script'
exit 1
fi
log_message "Cloning files from git"
branch=${2:-"develop"}
if [[ ! -d "$monkey_home/monkey" ]]; then # If not already cloned