diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-08-15 13:43:12 +0200 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2024-08-15 13:43:12 +0200 |
commit | 93bdfbb5d7b16a44cb23e6ee2bffd3eef368f8fc (patch) | |
tree | a89c3fc9a5536845ae3e199d8c7d4519a2381275 | |
parent | cf02ebd79108335a1d2db756e107291f2e9bbe42 (diff) |
checkpoint
-rwxr-xr-x | bin/common/gt | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/bin/common/gt b/bin/common/gt index c054bfa..8b0a95f 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -18,7 +18,6 @@ help() { cat >&2 <<EOF usage: gt [OPTION] -a PATH add repo --y show sync status -c COMMAND run 'git COMMAND' in each repo -h show this help -l list repos @@ -80,22 +79,24 @@ while getopts ":a:c:f:lsheu" opt; do e) $EDITOR "$repos" ;; f) repos="$OPTARG" ;; u) - >&2 printf 'pull.\n' + >&2 printf 'pull:\n' if [ "$parallel" ]; then list_repos | parallel gt-cmd {} pull - >&2 printf 'push.\n' - list_repos | - xargs -I{} gt-st {} | - awk -F: '/↑/ {print $1}' | - parallel gt-cmd {} push else list_repos | xargs -I{} gt-cmd {} pull - >&2 printf 'push.\n' - list_repos | - xargs -I{} gt-st {} | - awk -F: '/↑/ {print $1}' | - xargs -I{} gt-cmd {} push + fi + + >&2 printf 'push:\n' + list_repos | + xargs -I{} gt-st {} | + awk -F: '/↑/ {print $1}' | + sed "s@^~@$HOME@" | + if [ "$parallel" ]; then + parallel gt-cmd {} push + else + xargs -I{} gt-cmd {} push + fi ;; h) help ;; :) |