fix: add quoting and error handling for shellcheck compliance
Some checks failed
Syntax Check / syntax-check (push) Failing after 4s

This commit is contained in:
2026-02-11 05:20:27 +00:00
parent 1d1d93f8f0
commit 624f0d2f32

6
git.sh
View File

@@ -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