21 lines
429 B
Bash
Executable File
21 lines
429 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if [ -z "$1" ]
|
|
then
|
|
echo "usage: port-search <file pattern> <search term>"
|
|
exit 2
|
|
fi
|
|
type="$1"
|
|
shift
|
|
|
|
find /usr/ports/ \
|
|
-not \( -path "/usr/ports/pobj" -prune \
|
|
-o -path "*/distfiles" -prune \
|
|
-o -path "*/packages" -prune \
|
|
-o -path "*/logs" -prune \
|
|
-o -path "*/CVS" -prune \
|
|
\) \
|
|
-type f \
|
|
-iname "$type" \
|
|
-exec ugrep -F -- "$@" {} +
|