From 3fc98052197a374c1ee85feee3ebf0ab1ff8529c Mon Sep 17 00:00:00 2001 From: Pavel 'LEdoian' Turinsky Date: Fri, 7 Jan 2022 03:08:23 +0100 Subject: [PATCH] Fix comparison in deploy.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is not perl, so -ne does _arithmetic_ comparison, not string. And since that is in an if, it does not break the script… --- deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 67cc6b0..8a4a267 100755 --- a/deploy.sh +++ b/deploy.sh @@ -26,7 +26,7 @@ fi currentbranch="$(git branch --format '%(refname:short)')" # If we are not on target branch, switch and run again -if test "$currentbranch" -ne "$branch"; then +if test "$currentbranch" '!=' "$branch"; then exec /bin/sh -eu "git checkout $branch && exec $0" fi