forked from p15670423/monkey
Use exists function for deploy_linux.sh.
This commit is contained in:
parent
5c7cc5117a
commit
9493cad5e6
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue