aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2001-06-29 11:39:54 +0800
committergreen <green@FreeBSD.org>2001-06-29 11:39:54 +0800
commitd90d562435a9112310d0c8113ed94522559f1ca5 (patch)
tree88e2c579ce33e0a8c0682ec1aa2f876922280c8e
parent37e4554aa5fa40be19e3c842e126ede06baaaf76 (diff)
downloadfreebsd-ports-gnome-d90d562435a9112310d0c8113ed94522559f1ca5.tar.gz
freebsd-ports-gnome-d90d562435a9112310d0c8113ed94522559f1ca5.tar.zst
freebsd-ports-gnome-d90d562435a9112310d0c8113ed94522559f1ca5.zip
Make 'make search key="something with spaces"' etc. work.
Ignored for: almost a year
-rw-r--r--Mk/bsd.port.subdir.mk2
1 files changed, 1 insertions, 1 deletions
diff --git a/Mk/bsd.port.subdir.mk b/Mk/bsd.port.subdir.mk
index 40e1f2882c6c..5a6511c54f6f 100644
--- a/Mk/bsd.port.subdir.mk
+++ b/Mk/bsd.port.subdir.mk
@@ -252,7 +252,7 @@ search: ${PORTSDIR}/INDEX
cd ${PORTSDIR}; \
top=`pwd`; \
there=`echo "$$here/" | sed s%$$top%${PORTSDIR}%`; \
- if [ $$key ]; then \
+ if [ -n "$$key" ]; then \
grep $$there ${PORTSDIR}/INDEX | grep -i "${key}" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \
elif [ $$name ]; then \
grep $$there ${PORTSDIR}/INDEX | grep -i "^[^|]*${name}[^|]*|" | awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }'; \