1
0
Fork 0
mirror of https://github.com/imjasonh/urls synced 2026-07-20 21:38:47 +00:00

try to be more reproducible; sort keys, sort items

This commit is contained in:
Jason Hall 2023-01-26 11:25:15 -05:00
parent b0b0ff59af
commit f7546fd312
Failed to extract signature
6 changed files with 117 additions and 75 deletions

View file

@ -9,5 +9,11 @@ while read l; do
fn=${l#"https://"}
echo $fn
mkdir -p $(dirname $fn)
curl $l | jq > $fn
curl -s $l | jq > $fn
if [ "$(jq 'has("keys")' $fn)" == "true" ]; then
jq -S -s 'sort_by(.keys[].kid)' $fn | sponge $fn
fi
if grep -q "BEGIN CERTIFICATE" $fn; then
jq -S '.' $fn | sponge $fn
fi
done < urls.txt