summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/pkg_info
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/pkg_add/pkg_info')
-rw-r--r--usr.sbin/pkg_add/pkg_info11
1 files changed, 6 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg_info b/usr.sbin/pkg_add/pkg_info
index e51dd170ae4..d0d995034a4 100644
--- a/usr.sbin/pkg_add/pkg_info
+++ b/usr.sbin/pkg_add/pkg_info
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_info,v 1.62 2007/06/20 13:44:39 espie Exp $
+# $OpenBSD: pkg_info,v 1.63 2007/06/26 19:11:28 espie Exp $
#
# Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org>
#
@@ -220,10 +220,8 @@ sub just_in_time_header
{
my ($pkg, $handle, $rdone) = @_;
return if $$rdone == 1;
- if ($terse) {
- print $opt_l, $pkg, "\n" unless $opt_q;
- } else {
- print $opt_l, "Information for ", $handle->url, "\n\n" unless $opt_q;
+ if (!$terse && !$opt_q) {
+ print $opt_l, "Information for ", $handle->url, "\n\n";
}
$$rdone = 1;
}
@@ -454,6 +452,9 @@ if (@sought_files) {
}
for my $pkg (@ARGV) {
+ if ($terse && !$opt_q) {
+ print $opt_l, $pkg, "\n";
+ }
find_pkg($pkg, \&print_info);
}
if ($pkgs > 1) {