From b47d54d6da838805e1491f583b4be4fa53a2523c Mon Sep 17 00:00:00 2001 From: Renato Dell'Osso <54045197+renatodellosso@users.noreply.github.com> Date: Tue, 2 Apr 2024 12:47:20 -0400 Subject: [PATCH] Fix conditional statement in cd.sh script --- cd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cd.sh b/cd.sh index bf6f3ee..ac3d8b7 100644 --- a/cd.sh +++ b/cd.sh @@ -5,7 +5,7 @@ cd ./../home/ubuntu/RMUD2 git fetch pid=$(sudo lsof -t -i:2001) echo "Existing process: $pid" -if [[ "$(git rev-parse $BRANCH)" != "$(git rev-parse "$REMOTE/$BRANCH")" ]] || [["$pid" == ""]]; then +if [[ "$(git rev-parse $BRANCH)" != "$(git rev-parse "$REMOTE/$BRANCH")" ]] || [ -z "$pid"]; then rm -rf ./cd.log echo "Deploying new changes at $(date): $(git log -1 --pretty=%B)" bash start.sh &