X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=find-sources.sh;h=9cb24ecbe925d2cdace0e70332ea3b2a7bc40b5d;hb=a3d3979b7daaf22ea63ca356edbfa8047dff7b78;hp=df2080baa424f9ddf01444f08d502a01042722f5;hpb=47368f306a577d1e46df69a7f729bd3893cbe5e7;p=senf.git diff --git a/find-sources.sh b/find-sources.sh index df2080b..9cb24ec 100755 --- a/find-sources.sh +++ b/find-sources.sh @@ -1,4 +1,23 @@ -#!/bin/sh +#!/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 + cond='( -name *.h -o -name *.hh -o -name *.ih -o -name *.c -o -name *.cc -o -name *.cci -o -name *.ct -o -name *.cti )' +fi + +set -f find . \ -name .svn -prune -o \ @@ -11,5 +30,5 @@ find . \ -name .test.bin -o \ -name "*.stamp" -o \ -name ".sconsign*" -o \ - -type f \( "$@" \) + -type f $cond \( "$@" \)