Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/games/wtf Try freebsd's pkg-info as well



details:   https://anonhg.NetBSD.org/src/rev/15b081b61372
branches:  trunk
changeset: 365469:15b081b61372
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Aug 16 13:31:04 2018 +0000

description:
Try freebsd's pkg-info as well

>From John Hein, via Nikolai Lifanov. PR misc/52684

diffstat:

 games/wtf/wtf |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r d5cc5d70bdd0 -r 15b081b61372 games/wtf/wtf
--- a/games/wtf/wtf     Thu Aug 16 12:03:36 2018 +0000
+++ b/games/wtf/wtf     Thu Aug 16 13:31:04 2018 +0000
@@ -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 @@
                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



Home | Main Index | Thread Index | Old Index