]> git.phdru.name Git - git-scripts.git/commitdiff
Fix `while read`; report non-existing directories
authorOleg Broytman <phd@phdru.name>
Fri, 14 Oct 2016 22:11:22 +0000 (01:11 +0300)
committerOleg Broytman <phd@phdru.name>
Fri, 14 Oct 2016 22:11:22 +0000 (01:11 +0300)
do-all

diff --git a/do-all b/do-all
index 5f5a226f073f82de369935ecfc06a1bbc7bf2dba..4b87ab27227573a16963a5fbe53542eb937a6a01 100755 (executable)
--- 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 "$@"