From 934efde05525734c7d02dbcd5615f8999e8b8817 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 11 Jul 2024 21:54:29 +0200 Subject: checkpoint --- bin/common/gt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/common/gt') diff --git a/bin/common/gt b/bin/common/gt index 477adfc..9f98c15 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -85,7 +85,7 @@ while getopts ":a:c:f:lsheu" opt; do while read -r repo remote_url; do gt-sync "$repo" "$remote_url" done <"$repos" - fi | awk -F ':' '/x$/ {print $1}' | + fi | awk -F ':' '/x$/ {print $1}' | sed "s@~@$HOME@" | if [ "$parallel" ]; then parallel gt-cmd {} pull else -- cgit v1.2.3 From 320b7ed28d5b142d208f03a3e2f851bec9e1a678 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 11 Jul 2024 21:58:37 +0200 Subject: checkpoint --- bin/common/gt | 1 + bin/common/gt-cmd | 8 +++++--- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'bin/common/gt') diff --git a/bin/common/gt b/bin/common/gt index 9f98c15..1965ed1 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -103,5 +103,6 @@ while getopts ":a:c:f:lsheu" opt; do ;; esac done +>&2 printf '*: %s\n' "$*" # eval "herbe $(status | sed 's/"/\"/g;s/.*/"&"/' | tr '\n' ' ')" diff --git a/bin/common/gt-cmd b/bin/common/gt-cmd index 66efd50..faa743a 100755 --- a/bin/common/gt-cmd +++ b/bin/common/gt-cmd @@ -2,9 +2,11 @@ # path to repo repo="$1" +shift 2>/dev/null || exit 1 # git command -command="$2" -[ "$#" -lt 2 ] && exit 1 +command="$1" +shift 2>/dev/null || exit 1 +args="$*" repo_pretty="$(printf '%s' "$repo" | sed "s@^$HOME@~@")" @@ -13,6 +15,6 @@ if [ ! -d "$repo" ]; then exit 1 fi -git -C "$repo" "$command" >/dev/null 2>&1 +git -C "$repo" "$command" $args >/dev/null 2>&1 [ $? -gt 0 ] && s="x" || s="o" printf '%s: %s\n' "$repo_pretty" "$s" -- cgit v1.2.3