Skip to content

Commit 106d10c

Browse files
chore(Output): Make shell scripts POSIX-compliant
Replace bash-specific syntax with POSIX-compatible alternatives for broader shell compatibility: - Change shebang from #!/usr/bin/env bash to #!/usr/bin/env sh - Replace [[ ]] bash conditional with [ ] test command in prepublishOnly.sh - Update case statement indentation in Run.sh to POSIX style These changes ensure the shell scripts work reliably across different Unix-like systems and shells.
1 parent 0a5b23b commit 106d10c

2 files changed

Lines changed: 12 additions & 13 deletions

File tree

Source/Run.sh

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

33
if [ -z "$Dependency" ]; then
44
Dependency="CodeEditorLand/Editor"
55
fi
66

77
# shellcheck disable=SC2154
88
case "$Dependency" in
9-
"Microsoft/VSCode")
10-
Build="out"
11-
;;
9+
"Microsoft/VSCode")
10+
Build="out"
11+
;;
1212

13-
"CodeEditorLand/Editor")
14-
Build="Source"
15-
;;
16-
17-
*)
18-
exit 1
19-
;;
13+
"CodeEditorLand/Editor")
14+
Build="Source"
15+
;;
2016

17+
*)
18+
exit 1
19+
;;
2120
esac
2221

2322
Build "Source/**/*.{ts,json}" \

Source/prepublishOnly.sh

Lines changed: 2 additions & 2 deletions
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 "$Dependency" ]; then
44
Dependency="Microsoft/VSCode"
@@ -19,7 +19,7 @@ case "$Dependency" in
1919
;;
2020
esac
2121

22-
if [[ "$Dependency" = "Microsoft/VSCode" && "$NODE_ENV" = "development" ]]; then
22+
if [ "$Dependency" = "Microsoft/VSCode" ] && [ "$NODE_ENV" = "development" ]; then
2323
Build="out"
2424
fi
2525

0 commit comments

Comments
 (0)