Update 2024-12-13 08:54 OpenBSD/amd64-t14
This commit is contained in:
20
.bin/port-search
Executable file
20
.bin/port-search
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/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 -- "$@" {} +
|
||||
Reference in New Issue
Block a user