2011-08-09 20:00:28 |
Benjamin Saller |
description |
relation-get is used in shell scripts, but there isn't an easy way to parse json in shell scripts.
It would be awesome to be able to say eval `relation-get --output=shell` and have all of the variables just set as variables
So the output would be
SETTINGNAME=value\nSETTINGNAME2=value2\n
Also needs an optional --shell-prefix in case setting names clash with existing variables |
relation-get is used in shell scripts, but there isn't an easy way to parse json in shell scripts.
It would be awesome to be able to say eval `relation-get --output=shell` and have all of the variables just set as variables
So the output would be
VAR_SETTINGNAME=value\nVAR_SETTINGNAME2=value2\n
VAR_ is used to prefix relation get's variables before returning them with this output format. If VAR_ variables already exist in the environment they are unset and an error is noted on stderr. |
|