diff options
author | hubertf <hubertf@NetBSD.org> | 2007-08-06 21:14:36 +0000 |
---|---|---|
committer | hubertf <hubertf@NetBSD.org> | 2007-08-06 21:14:36 +0000 |
commit | 885bb16e22282113bc013037e968a99d11d6b016 (patch) | |
tree | f3e25660ac71ffd4e3dbdfdbc4991fc612f8cbe1 /wtf/wtf | |
parent | 2013e1a2ad4349d6106c721300119ea0e7a22333 (diff) | |
download | bsdgames-darwin-885bb16e22282113bc013037e968a99d11d6b016.tar.gz bsdgames-darwin-885bb16e22282113bc013037e968a99d11d6b016.tar.zst bsdgames-darwin-885bb16e22282113bc013037e968a99d11d6b016.zip |
Teach wtf(6) about pkgsrc's help facility:
% cd /usr/pkgsrc/audio/qsynth
% wtf subst
subst: ===> mk/subst.mk:
# This Makefile fragment implements a general text replacement facility.
...
Diffstat (limited to 'wtf/wtf')
-rw-r--r-- | wtf/wtf | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: wtf,v 1.14 2007/01/24 13:17:42 hubertf Exp $ +# $NetBSD: wtf,v 1.15 2007/08/06 21:14:36 hubertf Exp $ # # Public domain # @@ -77,6 +77,15 @@ while [ $# -gt 0 ] ; do shift ; continue fi + # Try querying pkgsrc's help facility next + if [ -f ../../mk/bsd.pkg.mk ] ; then + ans=`make help topic="$1"` + if [ $? -eq 0 ] ; then + echo "$1: $ans" + shift ; continue + fi + fi + # Give up! echo "$PROGNAME: I don't know what $1 means!" 1>&2 rv=1 |