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
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.devSigned-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
e75e308fd0
commit
77c746571a
15 changed files with 47 additions and 44 deletions
|
|
@ -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=.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue