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} mkdir -p ${monkey_home}
fi fi
git --version &>/dev/null if ! exists git; then
git_available=$?
if [[ ${git_available} != 0 ]]; then
echo "Please install git and re-run this script" echo "Please install git and re-run this script"
exit 1 exit 1
fi 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" log_message "Cloning files from git"
branch=${2:-"develop"} branch=${2:-"develop"}
if [[ ! -d "$monkey_home/monkey" ]]; then # If not already cloned if [[ ! -d "$monkey_home/monkey" ]]; then # If not already cloned