fix: add quoting and error handling for shellcheck compliance
Some checks failed
Syntax Check / syntax-check (push) Failing after 4s
Some checks failed
Syntax Check / syntax-check (push) Failing after 4s
This commit is contained in:
6
git.sh
6
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user