Update 2024-12-31 10:47 OpenBSD/amd64-t14

This commit is contained in:
c0dev0id
2024-12-31 10:47:38 +01:00
parent 9ffce7022e
commit 9f55042b33
23 changed files with 369 additions and 499 deletions

View File

@@ -1,12 +1,17 @@
#!/bin/sh
#!/bin/sh -x
if [ -z "$1" ]
then
echo "usage: port-search <file pattern> <search term>"
echo "usage: port-search [file pattern] <search term>"
exit 2
fi
type="$1"
shift
if [ -n "$2" ]
then
_filter="-iname *$1*" \
_term="$2"
else
_term="$1"
fi
find /usr/ports/ \
-not \( -path "/usr/ports/pobj" -prune \
@@ -16,5 +21,5 @@ find /usr/ports/ \
-o -path "*/CVS" -prune \
\) \
-type f \
-iname "$type" \
-exec ugrep -F -- "$@" {} +
$_filter \
-exec ugrep -i -F -- "$_term" {} +