From 9d2d5f568e4573fd4575b8fa3874fe55995476d2 Mon Sep 17 00:00:00 2001 From: Adam Goldsmith Date: Sat, 15 Apr 2023 21:50:16 -0400 Subject: [PATCH] Update only target directories which have .git directories Or files, technically --- dup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dup b/dup index 1bed008..256bd37 100755 --- a/dup +++ b/dup @@ -67,7 +67,7 @@ function run_script() { do if [ -e "$target/$script" ] then - $quiet || echo "Running $target$script" + [[ "$quiet" == true ]] || echo "Running $target/$script" "$target/$script" ${quiet:+-q} fi done @@ -144,10 +144,12 @@ elif [ "$bootstrap" != true ] then do_pull_maybe_quiet .dotfiles . - for dir in */ + targets="$(find * -maxdepth 0 -type d -execdir test -e "{}/.git" \; -print)" + + for dir in $targets do do_pull_maybe_quiet "$dir" done - maybe_stow "*/" + maybe_stow $targets fi