Advertisement
Guest User

Untitled

a guest
Apr 14th, 2025
15
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.36 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # run from .../ConnectIQ/Devices
  4.  
  5. # for each device directory, combine compiler.json and simulator.json to .tmp.json
  6. find -d . -type d -mindepth 1 -maxdepth 1 -exec sh -c 'jq -s add "{}/compiler.json" "{}/simulator.json" > "{}/.tmp.json"' ";"
  7.  
  8. # create array of objects from */.tmp.json
  9. jq --slurp '.' */.tmp.json > devices.json
  10.  
  11. rm */.tmp.json
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement