#! /bin/sh
-(locate -b \\.git && locate -b \*.git) | sed 's!/\.git$!!' |
- sort | uniq >locate-all.list
+locate -b \*.git |
+ grep -v "/archive/SQLObject/\|/archive/cheetah3/\|/third-party/\|$HOME/tmp/" |
+ while read path; do
+ if [ -d "$path" ]; then # skip files `.git` - they're submodules
+ if [ "`basename \"$path\"`" = .git ]; then
+ dirname "$path"
+ else
+ echo "$path"
+ fi
+ fi
+ done |
+ LC_ALL=C sort | uniq > locate-all.list