]> git.ipfire.org Git - thirdparty/curl.git/commit
OS400: fix shellcheck warnings in scripts
authorViktor Szakats <commit@vsz.me>
Sun, 7 Apr 2024 12:39:59 +0000 (12:39 +0000)
committerViktor Szakats <commit@vsz.me>
Thu, 11 Apr 2024 07:48:51 +0000 (07:48 +0000)
commit8a622baf9e9233241bbe93d6599c99cb46478614
tree3ed64b758f3e1805c7dad0dcbab16c2ee11fa1ed
parent8dd81bd5db6d087c1d0f1b0332a5e8d0ad50d634
OS400: fix shellcheck warnings in scripts

- use `$()` instead of backticks, and re-arrange double-quotes inside.
- add missing `|| exit 1` to `cd` calls. (could be dropped by using `set -eu`.)
- add `-n` to a few `if`s.
- shorten redirections by using `{} >` (as shellcheck recommended).
- silence warnings where variables were detected as unused (SC2034).
- a couple misc updates to silence warnings.
- switch to bash shebang for `-ot` feature.
- split two lines to unbreak syntax highlighting in my editor. (`$(expr \`, `$(dirname \`)

Also enable CI checks for OS/400 shell scripts.

Ref: #13307
Closes #13309
.github/scripts/shellcheck.sh
packages/OS400/config400.default
packages/OS400/initscript.sh
packages/OS400/make-include.sh
packages/OS400/make-lib.sh
packages/OS400/make-src.sh
packages/OS400/make-tests.sh
packages/OS400/makefile.sh