From: Viktor Szakats Date: Wed, 15 Oct 2025 17:46:35 +0000 (+0200) Subject: firefox-db2pem.sh: add macOS support, tidy-ups X-Git-Tag: rc-8_17_0-2~63 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da06621d617ab498a989afe75b7c2a4193d619e4;p=thirdparty%2Fcurl.git firefox-db2pem.sh: add macOS support, tidy-ups Cherry-picked from #19076 Closes #19086 --- diff --git a/scripts/firefox-db2pem.sh b/scripts/firefox-db2pem.sh index c774ab9107..634e429b50 100755 --- a/scripts/firefox-db2pem.sh +++ b/scripts/firefox-db2pem.sh @@ -32,7 +32,11 @@ set -eu -db=$(ls -1d "$HOME"/.mozilla/firefox/*default*) +if [ -d "$HOME/Library/Application Support"/Firefox/Profiles ]; then + db=$(ls -1d "$HOME/Library/Application Support"/Firefox/Profiles/*default*) +else + db=$(ls -1d "$HOME"/.mozilla/firefox/*default*) +fi out="${1:-}" if test -z "$out"; then @@ -55,7 +59,7 @@ certutil -L -h 'Builtin Object Token' -d "$db" | \ grep ' *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$' | \ sed -e 's/ *[CcGTPpu]*,[CcGTPpu]*,[CcGTPpu]* *$//' -e 's/\(.*\)/"\1"/' | \ sort | \ -while read -r nickname; \ - do echo "$nickname" | sed -e "s/Builtin Object Token://g"; \ - echo "$nickname" | xargs -I{} certutil -d "$db" -L -a -n -- {} ; \ +while read -r nickname; do + echo "$nickname" | sed 's/Builtin Object Token://g' + echo "$nickname" | xargs -I{} certutil -d "$db" -L -a -n {} done >> "$out"