X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=tools%2Ffind-sources.sh;h=4a1e7346000819017a681e39b0ae7cd8d86b1f86;hb=84f14a42f9993e186c7897ce0db021300e0a2d48;hp=ecc3267ac7d8c3898e99bcf1dbda0cf5628d2d12;hpb=84bd150c667e693c7ba6c31819b3f155f53e514a;p=senf.git diff --git a/tools/find-sources.sh b/tools/find-sources.sh index ecc3267..4a1e734 100755 --- a/tools/find-sources.sh +++ b/tools/find-sources.sh @@ -1,16 +1,5 @@ #!/bin/sh -e -if [ -z "$1" ]; then - echo "Usage:" - echo " $0 [-c] " - echo - echo "-c Only list C/C++ source files" - echo - echo " are any find commands (which should contain a -print somewhere)" - echo "which are matched for any file fond" - exit 1 -fi - cond="" if [ "$1" = "-c" ]; then shift @@ -21,11 +10,18 @@ set -f find . \ -name .svn -prune -o \ + -name .git -prune -o \ + -name .sconf_temp -prune -o \ -name doc -prune -o \ -name debian -prune -o \ -name dist -prune -o \ + -name build -prune -o \ + -path "*/tools/scons-*" -prune -o \ -name "*.a" -o \ -name "*.o" -o \ + -name "*.os" -o \ + -name "*.so" -o \ + \( -type f -a ! -name "*.*" -a -exec sh -c "file --brief {} | grep -q ELF" \; \) -o \ -name "*~" -o \ -name "#*#" -o \ -name "*.pyc" -o \ @@ -34,4 +30,4 @@ find . \ -name ".sconsign*" -o \ -name "semantic.cache" -o \ -name "all_includes.hh" -o \ - -type f $cond \( "$@" \) + -type f $cond \( "$@" -print \)