scripts: Fix shellcheck errors
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 4m23s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m30s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 4m2s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m6s
CI / Packaging test (push) Successful in 0s

Fix shellcheck SC2068 (unquoted array expansions), SC2145 (mixed string/array arguments), SC2328 (redirection in command substitution), SC2173 (untrapable signals), and SC2148 (missing shebang) errors across 14 script files.

Also configure scripts/Makefile with --severity=error so that only errors (not warnings or notes) cause check failures. To be tightened by follow-up commits.

Assisted-by: unsloth/Qwen3.6-35B-A3B-GGUF:IQ4_NL and pi.dev
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-06-25 21:42:22 +02:00
commit 77c746571a
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61
15 changed files with 47 additions and 44 deletions

View file

@ -2,7 +2,7 @@
log()
{
echo $@
printf '%s\n' "$*"
}
goodbye()
@ -29,7 +29,7 @@ EOT
fatal()
{
log "$@"
log "$*"
log "Giving up."
quit 1
}
@ -47,7 +47,7 @@ get_os()
cfg_section()
{
ini_section "$inifile" $@
ini_section "$inifile" "$@"
}
scm_commit()
@ -77,7 +77,7 @@ abspath()
read_map()
{
cmd_version -p `platform` $@ read | sed 's/-dev//'
cmd_version -p `platform` "$@" read | sed 's/-dev//'
}
write_map()
@ -88,13 +88,13 @@ write_map()
find_path()
{
local p
for p in $@; do
for p in "$@"; do
[ -e "$p" ] && {
echo $p
return 0
}
done
fatal "none of the paths \"$@\" exists"
fatal "none of the paths \"$*\" exists"
}
scm_files()
@ -148,7 +148,7 @@ check_cwd()
create_empty_dir()
{
[ $# != 2 ] && \
fatal "Unable to create empty directory \"$@\"."
fatal "Unable to create empty directory \"$*\"."
local dir="$1"
shift
@ -439,7 +439,7 @@ build_pkg()
local distribution=`get_os`
expand_version_macros() {
echo $@ | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"
echo "$@" | sed "s/__NEXT_VERSION__/$version/g; s/VERSION-REVISION/$version/g; s/VERSION/$version/g"
}
local rpm_requires_run=`expand_version_macros $PKG_REQUIRES_RUN`
@ -1122,7 +1122,7 @@ cmd_milk_install_log()
# ---- here we go
umask 0022
trap goodbye SIGINT SIGKILL
trap goodbye SIGINT
# -- default values
TOPDIR=.