diff --git a/git.sh b/git.sh index d5e6cfb..9dce588 100644 --- a/git.sh +++ b/git.sh @@ -14,7 +14,7 @@ if [ "$1" = "" ]; then fi if [ "$2" = git.flag ]; then #cd to the folder where the git deployment lives -cd $1 +cd "$1" || exit if [ -e "git.flag" ]; then slackecho "Deploying to $1" @@ -23,10 +23,10 @@ cd $1 #git fetch / reset deployment git fetch --all - git reset --hard origin/$3 + git reset --hard origin/"$3" #fix permissions - chown www-data:www-data $1 -R + chown www-data:www-data "$1" -R slackecho "Completed" fi