Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # run from .../ConnectIQ/Devices
- # for each device directory, combine compiler.json and simulator.json to .tmp.json
- find -d . -type d -mindepth 1 -maxdepth 1 -exec sh -c 'jq -s add "{}/compiler.json" "{}/simulator.json" > "{}/.tmp.json"' ";"
- # create array of objects from */.tmp.json
- jq --slurp '.' */.tmp.json > devices.json
- rm */.tmp.json
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement