summaryrefslogtreecommitdiffstats
path: root/usr.sbin/pkg_add/pkg_mklocatedb
diff options
context:
space:
mode:
authorespie <espie@openbsd.org>2010-06-09 11:57:21 +0000
committerespie <espie@openbsd.org>2010-06-09 11:57:21 +0000
commitece832d9c15dd0929cb20c2a22f468debca518dc (patch)
treebf31b587d9acc0bde0837738123e2c94e0ca7f05 /usr.sbin/pkg_add/pkg_mklocatedb
parentFix the pop operation to make PHP work again. When popping the last label (diff)
downloadwireguard-openbsd-ece832d9c15dd0929cb20c2a22f468debca518dc.tar.xz
wireguard-openbsd-ece832d9c15dd0929cb20c2a22f468debca518dc.zip
common pattern reuse
Diffstat (limited to 'usr.sbin/pkg_add/pkg_mklocatedb')
-rw-r--r--usr.sbin/pkg_add/pkg_mklocatedb8
1 files changed, 2 insertions, 6 deletions
diff --git a/usr.sbin/pkg_add/pkg_mklocatedb b/usr.sbin/pkg_add/pkg_mklocatedb
index 39d2b7c0ee1..2f4353137b1 100644
--- a/usr.sbin/pkg_add/pkg_mklocatedb
+++ b/usr.sbin/pkg_add/pkg_mklocatedb
@@ -1,6 +1,6 @@
#! /usr/bin/perl
# Copyright (c) 2005-2010 Marc Espie <espie@openbsd.org>
-# $OpenBSD: pkg_mklocatedb,v 1.25 2010/06/09 10:58:01 espie Exp $
+# $OpenBSD: pkg_mklocatedb,v 1.26 2010/06/09 11:57:21 espie Exp $
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
@@ -73,11 +73,7 @@ sub tag
return $r;
}
-try {
- getopts('ad:nqs:x:r:p:P');
-} catchall {
- $ui->usage($_);
-};
+$ui->do_options(sub { getopts('ad:nqs:x:r:p:P'); });
my $fh;
my $MKLOCATEDB = OpenBSD::Paths->mklocatedb;