mirror of
https://github.com/blacktop/ipsw.git
synced 2026-05-08 12:22:26 +00:00
13 lines
320 B
Bash
Executable File
13 lines
320 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
files=($(find -E ./pkg -type f -name '*.json'))
|
|
|
|
for item in ${files[*]}; do
|
|
printf "Minimizing JSON: %s\n" $item
|
|
cp $item /tmp/$(basename -- $item)
|
|
cat /tmp/$(basename -- $item) | jq -c >$item
|
|
rm /tmp/$(basename -- $item)
|
|
gzip -c $item >"$(dirname $item)/$(basename -- $item .json).gz"
|
|
done
|