summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-31 17:38:44 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-31 17:38:44 +0100
commit442fdac531a6b042a396eafc096811e46bc063ca (patch)
treef10e23a2fdedeff756cb70869845313aa332a8be /bin
parentcfb3aed2b81be807d385845cf0807d99dc0d1ac4 (diff)
check if git dir before doing anything
Diffstat (limited to 'bin')
-rwxr-xr-xbin/extra/supd3
1 files changed, 2 insertions, 1 deletions
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'