From 9493cad5e65413820b39a99dee78eb9a5cd8ba0b Mon Sep 17 00:00:00 2001 From: Daniel Goldberg Date: Thu, 16 Jan 2020 19:54:02 +0200 Subject: [PATCH] Use exists function for deploy_linux.sh. --- deployment_scripts/deploy_linux.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/deployment_scripts/deploy_linux.sh b/deployment_scripts/deploy_linux.sh index d5d2b1957..5c52088e4 100755 --- a/deployment_scripts/deploy_linux.sh +++ b/deployment_scripts/deploy_linux.sh @@ -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