mirror of
https://github.com/xroche/httrack.git
synced 2026-06-22 01:57:01 +03:00
Fix the shellcheck findings the shfmt pass left behind, all proven
behaviour-preserving:
- Quote single-value expansions, drop the redundant ${} in arithmetic,
add read -r, and use printf '%s' instead of variables in format
strings, across the generators, crawl-test.sh, run-all-tests.sh and
search.sh.
- crawl-test.sh / webhttrack: turn the deliberately word-split search
lists into bash arrays (space-safe, no scattered disables) and replace
the numeric trap signal lists with names, dropping the un-trappable
KILL/STOP that bash silently ignored anyway.
- search.sh: drop the bogus \" escapes that made grep search for a
literal-quoted pattern.
The generators are exercised by hand and ship their committed output
(htscodepages.h, htsentities.h); a differential run on synthetic input
confirms byte-identical output before and after. crawl-test.sh and
webhttrack were run end to end against a local server / a faked install,
the latter also proving the array search now survives spaces in paths.
SC2153/SC2120 false positives carry a scoped disable with a reason.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>