diff options
| author | tv <tv@krebsco.de> | 2015-11-08 12:43:02 +0100 | 
|---|---|---|
| committer | tv <tv@krebsco.de> | 2015-11-08 12:43:02 +0100 | 
| commit | ea8b76569c6b226fe148e559477669b095408472 (patch) | |
| tree | 3afedb6cbc87ddaa6820817c730c9b0743775ea4 | |
| parent | c5f4bda5bd00bad7778bbd5a9af8d476de0de920 (diff) | |
JSON harder!
| -rwxr-xr-x | push | 7 | 
1 files changed, 4 insertions, 3 deletions
| @@ -20,10 +20,11 @@ my_hosts() {  }  all_push_hosts() { -  echo '{'    git remote -v \ -    | sed -n 's/^\(\S\+\)\s\+git@\([^:]\+\):\(\S\+\) (push)$/"\1":{"host":"\2","repo":"\3"}/;T;$!s/$/,/;p' -  echo '}' +    | sed -n ' +        s/^\(\S\+\)\s\+git@\([^:]\+\):\(\S\+\) (push)$/{"key":"\1","value":{"host":"\2","repo":"\3"}}/p +      ' \ +    | jq -s from_entries  }  my_push_hosts() { | 
