]> git.rm.cloudns.org Git - xonotic/xonotic.git/commitdiff
Try implementing some grep functionality for ./all script.
authorMatthias Krüger <matthias.krueger@famsik.de>
Sun, 2 Jun 2013 06:31:06 +0000 (08:31 +0200)
committerMatthias Krüger <matthias.krueger@famsik.de>
Sun, 2 Jun 2013 06:31:06 +0000 (08:31 +0200)
Basically works like  ./all each -k git grep -I
May still need some improvements.

misc/tools/all/git.subr

index 69ad888f10faf3b5f84f8d7297213ba82a1b55a6..41150d8f7767a7bb6a8ba420e46a2579e09fd126 100644 (file)
@@ -960,6 +960,14 @@ case "$cmd" in
                $ECHO "  $SELF update|pull [-N] [-s | -h [-p] | -g [-p]] [-l de|nl|default]"
                handled=false
                ;;
+       grep)
+               for d in $repos; do
+                       if verbose cd "$d0/$d"; then
+                                       git grep -I "$@" || true
+                               cd "$d0"
+                       fi
+               done
+               ;;
        *)
                handled=false
                ;;