X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=locate-all;h=f83a8827e6caec8c5ef889893ccacecf69b6bc4e;hb=e364445d1adb40b906101cb3ce1acde85b2ffd36;hp=b4fcdeea3cf24e0f85c0ecf13902b13d276edf48;hpb=a6ae824ff1502e3fe34c1fc18aa7610add5f6dfd;p=git-scripts.git diff --git a/locate-all b/locate-all index b4fcdee..f83a882 100755 --- a/locate-all +++ b/locate-all @@ -1,4 +1,13 @@ #! /bin/sh -locate -b \*.git | sed 's!/\.git$!!' | - grep -v "/archive/SQLObject/\|/third-party/\|$HOME/tmp/" | - sort | uniq > locate-all.list +locate -b \*.git | + grep -v "/archive/SQLObject/\|/archive/cheetah3/\|$HOME/tmp/\|/third-party/" | + while read path; do + if [ -d "$path" ]; then # skip files `.git` - they're submodules + if [ "`basename \"$path\"`" = .git ]; then + dirname "$path" # translate `project/.git/` to just `project/` + else + echo "$path" # bare repo `project.git/` + fi + fi + done | +LC_ALL=C sort -u > locate-all.list