X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=tools%2Ffind-sources.sh;h=33ea4b8a02fd77a0da8e6ec552090dfbc0131289;hb=7225d467b3ceaf96bce7ec914a88acb9608c2f5e;hp=b1481548e24f807a0cad789a2305e22a69ef70b4;hpb=737789818bf8658d3b3f4444a273b2d44021e51a;p=senf.git diff --git a/tools/find-sources.sh b/tools/find-sources.sh index b148154..33ea4b8 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 @@ -26,8 +15,12 @@ find . \ -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 \ @@ -36,4 +29,4 @@ find . \ -name ".sconsign*" -o \ -name "semantic.cache" -o \ -name "all_includes.hh" -o \ - -type f $cond \( "$@" \) + -type f $cond \( "$@" -print \)