Improve fields fetching

This commit is contained in:
Paul Tyng
2020-05-20 22:00:09 -04:00
parent 2c982433c3
commit f0da875a46
2 changed files with 16 additions and 7 deletions

View File

@@ -1,10 +1,10 @@
#! /bin/bash
ver="5.12.35"
ver="$1"
keys=$(jq -r keys[] "$ver/Setting.json")
while IFS= read -r key; do
fn="$(echo $key | sed -r 's/(^|_)([a-z])/\U\2/g')"
echo "... $key $fn ..."
jq ".$key" "$ver/Setting.json" >> "$ver/Setting$fn.json"
jq ".$key" "$ver/Setting.json" > "$ver/Setting$fn.json"
done <<< "$keys"