summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-10 23:39:51 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-10 23:39:51 +0000
commit321a8d86401673b091b64413f05dbe53358c0638 (patch)
treec028dd5b84d79424b676d10fbbc526abfb163420 /usr.sbin
parentc1243dd3d425f1ed2e443ef64c366b6257899b39 (diff)
remove warning, adapted from Vadim Zhukov
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/pkg12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/pkg b/usr.sbin/pkg_add/pkg
index cb01b359f7d..e16274ba182 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.17 2010/06/09 07:26:01 espie Exp $
+# $OpenBSD: pkg,v 1.18 2010/06/10 23:39:50 espie Exp $
#
# Copyright (c) 2010 Marc Espie <espie@openbsd.org>
#
@@ -38,10 +38,12 @@ for my $i (@l) {
}
}
-for my $i (@l) {
- if ($ARGV[0] eq $i) {
- shift;
- run($i, "pkg $i");
+if (@ARGV) {
+ for my $i (@l) {
+ if ($ARGV[0] eq $i) {
+ shift;
+ run($i, "pkg $i");
+ }
}
}
print STDERR "Usage: pkg [",join("|", @l),"] [args]\n";