You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
742 B
33 lines
742 B
#!/bin/bash
|
|
|
|
FIND='find';
|
|
|
|
##if [[ "$OSTYPE" =~ "darwin" ]]
|
|
##then
|
|
## FIND='gfind'
|
|
##fi
|
|
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "$0 : find functions references "
|
|
echo "Usage $0 function_name "
|
|
exit;
|
|
fi
|
|
|
|
EXTRA=''
|
|
|
|
|
|
CMD="grep -rnH"
|
|
|
|
if [ "$2" != '--nocolor' ]
|
|
then
|
|
CMD="$CMD --color=always"
|
|
fi
|
|
|
|
|
|
$FIND -L . -name \*.json -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
|
-o -name \*.html -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
|
-o -name \*.jade -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} + \
|
|
-o -name \*.js -not -wholename \*node_modules\* -not -wholename \*public/lib\* -exec $CMD "$1" {} +
|
|
|
|
|