X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=find-sources.sh;h=b28c390cc52ce6ec9d1899e39525034f9f360b0c;hb=f13c1275e48e97dceb7de7925793a4c69a5aeb61;hp=df2080baa424f9ddf01444f08d502a01042722f5;hpb=47368f306a577d1e46df69a7f729bd3893cbe5e7;p=senf.git diff --git a/find-sources.sh b/find-sources.sh index df2080b..b28c390 100755 --- a/find-sources.sh +++ b/find-sources.sh @@ -1,4 +1,21 @@ -#!/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 find . \ -name .svn -prune -o \ @@ -11,5 +28,5 @@ find . \ -name .test.bin -o \ -name "*.stamp" -o \ -name ".sconsign*" -o \ - -type f \( "$@" \) + -type f $cond \( "$@" \)