GHA: add shellcheck job and fix warnings, shell tidy-ups

Reviewed-by: Daniel Stenberg
Closes #13307
This commit is contained in:
Viktor Szakats 2024-04-07 10:02:49 +00:00
parent 2c4f836f70
commit fa69b41c77
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
12 changed files with 441 additions and 415 deletions

View file

@ -26,8 +26,11 @@
# It extracts all ca certs it finds in the local Firefox database and converts
# them all into PEM format.
#
db=$(ls -1d $HOME/.mozilla/firefox/*default*)
out=$1
set -eu
db=$(ls -1d "$HOME"/.mozilla/firefox/*default*)
out="${1:-}"
if test -z "$out"; then
out="ca-bundle.crt" # use a sensible default
@ -35,7 +38,7 @@ fi
currentdate=$(date)
cat >$out <<EOF
cat > "$out" <<EOF
##
## Bundle of CA Root Certificates
##
@ -52,4 +55,4 @@ sort | \
while read -r nickname; \
do echo "$nickname" | sed -e "s/Builtin Object Token://g"; \
eval certutil -d "$db" -L -n "$nickname" -a ; \
done >> $out
done >> "$out"