a foreach command
authorRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 25 Mar 2010 14:37:47 +0000 (15:37 +0100)
committerRudolf Polzer <rpolzer@nb-04.(none)>
Thu, 25 Mar 2010 14:37:47 +0000 (15:37 +0100)
all

diff --git a/all b/all
index 4e1a63e1ca38c17b472a1eb0af37838c6e8dc69f..da755b7d6cc2a5ee55a8daea8e8cebe8f86016f0 100755 (executable)
--- a/all
+++ b/all
@@ -162,6 +162,13 @@ case "$cmd" in
                fi
                exec "darkplaces/darkplaces$client" -xonotic $@
                ;;
                fi
                exec "darkplaces/darkplaces$client" -xonotic $@
                ;;
+       each)
+               for d in $repos; do
+                       cd "$d0/$d"
+                       "$@"
+                       cd "$d0"
+               done
+               ;;
        *)
                echo "Usage:"
                echo "  $0 pull"
        *)
                echo "Usage:"
                echo "  $0 pull"
@@ -171,5 +178,6 @@ case "$cmd" in
                echo "  $0 checkout"
                echo "  $0 compile"
                echo "  $0 run <client> <options>"
                echo "  $0 checkout"
                echo "  $0 compile"
                echo "  $0 run <client> <options>"
+               echo "  $0 each <command>"
                ;;
 esac
                ;;
 esac