From d99323430cf89e6566899483419f99453140c665 Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 31 Oct 2023 14:34:37 +0100 Subject: make help more generic --- bin/extra/supd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bin/extra') diff --git a/bin/extra/supd b/bin/extra/supd index 48638bd..e8eacd4 100755 --- a/bin/extra/supd +++ b/bin/extra/supd @@ -7,7 +7,7 @@ then >&2 cat <<-EOF usage: supd Update dirs in current dir - ls ~/projects | supd Update dirs read from stdin + ... | supd Update dirs read from stdin supd -h Show help EOF exit -- cgit v1.2.3 From 442fdac531a6b042a396eafc096811e46bc063ca Mon Sep 17 00:00:00 2001 From: Raymaekers Luca Date: Tue, 31 Oct 2023 17:38:44 +0100 Subject: check if git dir before doing anything --- bin/extra/supd | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bin/extra') diff --git a/bin/extra/supd b/bin/extra/supd index e8eacd4..61ea144 100755 --- a/bin/extra/supd +++ b/bin/extra/supd @@ -17,9 +17,10 @@ fi for dir in $dirs do - printf '%s:' "$dir" | >&2 sed "s#$HOME#~#" ( cd "$dir" || return + git rev-parse > /dev/null 2>&1 || return + printf '%s:' "$dir" | >&2 sed "s#$HOME#~#" git "${1:-fetch}" > /dev/null 2>&1 && printf ' o' || printf ' x' -- cgit v1.2.3