Advertisement
cymplecy

Scratch2Ext

Feb 27th, 2018
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 0.79 KB | None | 0 0
  1. Standard extension.json file look likes this
  2. [
  3. { "name":"Pi GPIO", "type":"extension", "file":"piGPIOExtension.js", "md5":"pigpio.png", "url":"file:///usr/lib/scratch2/scratch_extensions/gpio.html", "tags":["hardware"]  },
  4. { "name":"Pi SenseHAT", "type":"extension", "file":"piSenseHATExtension.js", "md5":"pisensehat.png", "url":"file:///usr/lib/scratch2/scratch_extensions/sensehat.html", "tags":["hardware"]  }
  5. ]
  6.  
  7. I'm looking for grep/dsed/awk thingty bash script to add in
  8.  
  9.  
  10. { "name":"GrovePi", "type":"extension", "file":"piGrovePiExtension.js", "md5":"grovepi.png", "url":"file:///usr/lib/scratch2/scratch_extensions/grovepi.html", "tags":["hardware"]  },
  11.  
  12. but only if GrovePi is not already in the file - if it is in the file - then just leave alone
  13.  
  14. I'll be wanting to add a few more in future
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement