From 1002e0a2ec4e29445c574cbf3de837ae98192014 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 17 Aug 2008 17:25:19 +0200 Subject: bin/apt-why: Made 'not' a longoption --- bin/apt-why | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/apt-why b/bin/apt-why index 97af4b9..ed1e0a2 100755 --- a/bin/apt-why +++ b/bin/apt-why @@ -3,10 +3,14 @@ use strict; use warnings; use AptPkg::Cache; use Switch; +use Getopt::Long; my $cache = AptPkg::Cache->new; -my $packagename = pop or die("No packagename given"); -my $query = shift || ''; +my $not = 0; +GetOptions( + "not" => \$not, +); +my $packagename = shift or die("No packagename given"); my $package = $cache->{$packagename}; unless($package) { @@ -100,7 +104,7 @@ sub print_deps { } } -if ($query eq 'not') { +if ($not) { print_deps(why_not($package->{RevDependsList})); } else { print_deps(why($package->{RevDependsList})); @@ -131,3 +135,11 @@ An empty field means not installed. If B is specified, reverse dependencies prohibiting the install of I are shown. Else, reverse dependencies justifying the install of I are shown + +=head1 AUTHOR + +Daniel Friesel + +=head1 LICENSE + + 0. You just DO WHAT THE FUCK YOU WANT TO. -- cgit v1.2.3