summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xpush7
1 files changed, 4 insertions, 3 deletions
diff --git a/push b/push
index fc18882..8041472 100755
--- a/push
+++ b/push
@@ -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() {