From 5cd2cef151c5aa8102ee4555a02634d911c0c9dc Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Thu, 21 Aug 2025 15:06:26 +0200 Subject: checkpoint --- bin/common/gt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'bin') diff --git a/bin/common/gt b/bin/common/gt index 03ca464..cf05a1e 100755 --- a/bin/common/gt +++ b/bin/common/gt @@ -20,7 +20,7 @@ touch "$REPOS" || exit 1 which parallel >/dev/null 2>&1 && parallel=1 help() { - cat >&2 <&2 cat <&2 printf 'Couldn'\''t add '\''%s'\'', not a git repository.\n' "$OPTARG" + exit 1 + fi if grep "^$repo " "$REPOS" >/dev/null 2>&1; then - printf >&2 'added already.\n' - exit 3 + >&2 printf 'added already.\n' + exit 1 fi printf '%s %s\n' "$repo" "$remote_url" >>"$REPOS" - printf >&2 'added.\n' + >&2 printf 'added.\n' ;; c) quit_when_no_repos @@ -144,11 +148,11 @@ while getopts ":a:c:f:dlsheu" opt; do ;; h) help ;; :) - printf >&2 -- '-%s requires argument\n' "$OPTARG" + >&2 printf -- '-%s requires argument\n' "$OPTARG" exit 1 ;; ?) - printf >&2 -- 'Invalid option: -%s\n' "$OPTARG" + >&2 printf -- 'Invalid option: -%s\n' "$OPTARG" exit 1 ;; esac -- cgit v1.2.3-70-g09d2