From 3aa16bb5d1964ff8885cd0b00930277c25b1dbc7 Mon Sep 17 00:00:00 2001 From: Afzal Ansari Date: Sat, 14 May 2022 10:51:28 +0530 Subject: [PATCH] Refactor: Minor changes on shell script to support double quotes format and [ ] POSIX (#3889) * refactors sync sh Signed-off-by: afzal442 * fixes POSIX sh, as [[ ]] is undefined. Signed-off-by: afzal442 --- entrypoint.sh | 4 ++-- hack/apis/sync.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 073875004..93f16deb0 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,10 +1,10 @@ #!/bin/sh -if [[ "${1#-}" != "$1" ]]; then +if [ "${1#-}" != "$1" ]; then set -- manager "$@" fi -if [[ "$1" = "apiserver" ]]; then +if [ "$1" = "apiserver" ]; then shift # "apiserver" set -- apiserver "$@" fi diff --git a/hack/apis/sync.sh b/hack/apis/sync.sh index 2f0a9e020..3947b4477 100644 --- a/hack/apis/sync.sh +++ b/hack/apis/sync.sh @@ -75,7 +75,7 @@ then else git add . git commit -m "align with kubevela-$VERSION from commit $COMMIT_ID" - git tag $VERSION + git tag "$VERSION" git push origin main - git push origin $VERSION + git push origin "$VERSION" fi \ No newline at end of file