mirror of
https://github.com/blacktop/ipsw.git
synced 2026-05-08 12:22:26 +00:00
12 lines
340 B
Bash
Executable File
12 lines
340 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
find ./pkg ./internal/download -type f -name '*.json' | while read -r item; do
|
|
printf "Minimizing JSON: %s\n" "$item"
|
|
tmpfile="/tmp/$(basename -- "$item")"
|
|
cp "$item" "$tmpfile"
|
|
jq -c --sort-keys < "$tmpfile" > "$item"
|
|
rm "$tmpfile"
|
|
gzip -cn "$item" > "$(dirname "$item")/$(basename -- "$item" .json).gz"
|
|
done
|