summaryrefslogtreecommitdiff
path: root/bin/extra
diff options
context:
space:
mode:
authorRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-31 19:25:07 +0100
committerRaymaekers Luca <raymaekers.luca@gmail.com>2023-10-31 19:25:07 +0100
commit331272136a4fc36fce308dc87e4a1b53daba328b (patch)
treef10e23a2fdedeff756cb70869845313aa332a8be /bin/extra
parentff3a8bb2d62f5a7e1759eb3d9e0834f4396e833d (diff)
parent442fdac531a6b042a396eafc096811e46bc063ca (diff)
Merge branch 'main' of db:dotfiles
Diffstat (limited to 'bin/extra')
-rwxr-xr-xbin/extra/supd5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/extra/supd b/bin/extra/supd
index 48638bd..61ea144 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
@@ -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'