From a0e50466264a400b9452a7c46d34f03c3bd70562 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Sat, 15 Oct 2016 01:11:22 +0300 Subject: [PATCH] Fix `while read`; report non-existing directories --- do-all | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/do-all b/do-all index 5f5a226..4b87ab2 100755 --- a/do-all +++ b/do-all @@ -3,9 +3,8 @@ prog_dir="`dirname \"$0\"`" && cat "$prog_dir"/locate-all.list | -while true; do - read d || exit 0 - if ! test -d "$d"; then continue; fi +while read d; do + if ! test -d "$d"; then echo "No such dir: $d" >&2; continue; fi test -d "$d"/.git && g="$d"/.git || g="$d" b="`basename \"$d\" .git`" eval "$@" -- 2.39.2