Module Name: src
Committed By: maya
Date: Thu Aug 16 13:31:04 UTC 2018
Modified Files:
src/games/wtf: wtf
Log Message:
Try freebsd's pkg-info as well
>From John Hein, via Nikolai Lifanov. PR misc/52684
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/games/wtf/wtf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/games/wtf/wtf
diff -u src/games/wtf/wtf:1.24 src/games/wtf/wtf:1.25
--- src/games/wtf/wtf:1.24 Wed Mar 7 08:25:43 2018
+++ src/games/wtf/wtf Thu Aug 16 13:31:04 2018
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: wtf,v 1.24 2018/03/07 08:25:43 eadler Exp $
+# $NetBSD: wtf,v 1.25 2018/08/16 13:31:04 maya Exp $
#
# Public domain
#
@@ -96,6 +96,13 @@ for i; do
continue
fi
+ # Try pkg-info(1) next
+ ans="$(pkg info -qI "$i" 2> /dev/null)"
+ if [ $? -eq 0 ]; then
+ echo "$i: $ans"
+ continue
+ fi
+
# If called from pkgsrc package directory,
# try querying pkgsrc's help facility next
if [ -f ../../mk/bsd.pkg.mk ]; then