diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2010-06-09 07:26:02 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2010-06-09 07:26:02 +0000 |
commit | ba752ba29cd01e2c98ab76e540d6daf77a044531 (patch) | |
tree | 808a9a75326ddcc5fbb15fb87e7aab53916307a3 /usr.sbin/pkg_add/pkg | |
parent | bfffdd6a0c140d376362ad6d0fb26390a851a80c (diff) |
ui changes: go thru a state object for most printouts
Diffstat (limited to 'usr.sbin/pkg_add/pkg')
-rw-r--r-- | usr.sbin/pkg_add/pkg | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg b/usr.sbin/pkg_add/pkg index e0cd0d9b57c..cb01b359f7d 100644 --- a/usr.sbin/pkg_add/pkg +++ b/usr.sbin/pkg_add/pkg @@ -1,6 +1,6 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg,v 1.16 2010/06/05 17:15:32 espie Exp $ +# $OpenBSD: pkg,v 1.17 2010/06/09 07:26:01 espie Exp $ # # Copyright (c) 2010 Marc Espie <espie@openbsd.org> # @@ -21,27 +21,27 @@ use warnings; sub run { - my $cmd = shift; + my ($cmd, $name) = @_; my $module = "OpenBSD::Pkg\u$cmd"; eval "require $module;"; if ($@) { die $@; } - $module->parse_and_run; + $module->parse_and_run($name); exit(0); } my @l = qw(add check create delete info); for my $i (@l) { if ($0 =~ m/\/?pkg_$i$/) { - run($i); + run($i, "pkg_$i"); } } for my $i (@l) { if ($ARGV[0] eq $i) { shift; - run($i); + run($i, "pkg $i"); } } print STDERR "Usage: pkg [",join("|", @l),"] [args]\n"; |