config

OpenBSD system configuration
git clone git://jacobedwards.org/config
Log | Files | Refs | README

commit a2cf17233024a1d06f2c5ee3908124dca2d9beb0
parent 46e42fa270ff31b4a84667885533515b1d777519
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date:   Sun,  8 Oct 2023 08:37:01 -0700

Add -d (dump) flag to pkg_list

This outputs the raw ports index data for matched entries.

Diffstat:
Mlocal/bin/bin/pkg_list | 9+++++++--
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/local/bin/bin/pkg_list b/local/bin/bin/pkg_list @@ -11,11 +11,14 @@ function matchunless(s, re, unless) { } function parseargs() { + namef = 1 if (ARGV[1] == "-p") { namef = 2 return 2 + } else if (ARGV[1] == "-d") { + dump = 1 + return 2 } - namef = 1 return 1 } @@ -35,7 +38,9 @@ BEGIN { for (i in argv) if (!match(name, argv[i]) && !match(desc, argv[i])) next - if (NF != 14 || matchunless(arch, re, "^!")) + if (dump) + print + else if (NF != 14 || matchunless(arch, re, "^!")) print($namef, $4); else print($namef, $4 " (for " $11 "; not " myarch ")");