Skip to content

Commit e0f59f8

Browse files
committed
refactor(scripts): switch from bash to sh for enhanced portability
• Updated all scripts (action.sh, check.sh, deploy.sh, post_action.sh, post_check.sh) to use sh instead of bash. • Ensured compatibility across environments by replacing bash-specific syntax with POSIX-compliant alternatives. • Improved maintainability by standardizing the shebang to #!/usr/bin/env sh.
1 parent b068c35 commit e0f59f8

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

action.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
set -e
44

check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

3-
if [[ ! -s ~/.ssh/known_hosts ]]; then
3+
if [ ! -s ~/.ssh/known_hosts ]; then
44
echo "::error file=$(basename "$0"),line=${LINENO},endLine=${LINENO},title=Assertion Error::\
55
~/.ssh/known_hosts is missing or empty."
66
exit 1

deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
# renovate: datasource=docker depname=traefik/whoami versioning=docker
44
WHOAMI_VERSION="43a68d10b9dfcfc3ffbfe4dd42100dc9aeaf29b3a5636c856337a5940f1b4f1c" # v1.10

post_action.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
if [ -z "${SSH_KNOWN_HOSTS_FILE}" ]; then
44
echo "::error file=$(basename "$0"),line=${LINENO},endLine=${LINENO},title=Notice::\

post_check.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

3-
if [[ -s ~/.ssh/known_hosts ]]; then
3+
if [ -s ~/.ssh/known_hosts ]; then
44
echo "::error file=$(basename "$0"),line=${LINENO},endLine=${LINENO},title=Assertion Error::\
55
~/.ssh/known_hosts file should not exist after the job."
66
exit 1

0 commit comments

Comments
 (0)