summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2010-01-29 19:02:36 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2010-01-29 19:02:36 +0100
commit03879bd7766e784a3f431e41cfdd9ecc1bed6831 (patch)
tree9317fb63e210846b26bca21d4c2d5dae12ea2e1a
parent7de76ee5da413f5bd4f7ad227c1fdec10863ca9d (diff)
apt-why: Fix getopt order so options actually work again
-rwxr-xr-xbin/apt-why3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/apt-why b/bin/apt-why
index 0c67cb6..195d7bd 100755
--- a/bin/apt-why
+++ b/bin/apt-why
@@ -13,7 +13,6 @@ my $all = 0;
my $tabwidth;
my $tabsign = "\t";
my @deptypes = qw/Depends Recommends Suggests/;
-my $packagename = shift or die("Usage: $0 [options] <package>; see $0 --help\n");
my @known;
sub usage {
@@ -65,6 +64,8 @@ GetOptions(
'h|?|help' => \&usage,
);
+my $packagename = shift or die("Usage: $0 [options] <package>; see $0 --help\n");
+
if (defined $tabwidth) {
$tabsign = ' ' x $tabwidth;
}