./all each: new option -k "keep going"
authorRudolf Polzer <divverent@alientrap.org>
Thu, 17 Jun 2010 12:28:54 +0000 (14:28 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Thu, 17 Jun 2010 12:28:54 +0000 (14:28 +0200)
all

diff --git a/all b/all
index 5831e460184a5af01acae2f9d3d53c564001e0c0..0e794e4771d94c989bee80b76f8769683d07feea 100755 (executable)
--- a/all
+++ b/all
@@ -547,9 +547,18 @@ case "$cmd" in
                "$@"
                ;;
        each|foreach)
+               keep_going=false
+               if [ x"$1" = x"-k" ]; then
+                       keep_going=true
+                       shift
+               fi
                for d in $repos; do
                        if verbose cd "$d0/$d"; then
-                               verbose "$@"
+                               if $keep_going; then
+                                       verbose "$@" || true
+                               else
+                                       verbose "$@"
+                               fi
                                cd "$d0"
                        fi
                done