diff options
Diffstat (limited to 'utils/rhrd-show')
-rwxr-xr-x | utils/rhrd-show | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/rhrd-show b/utils/rhrd-show index f2a6aed..cc3b859 100755 --- a/utils/rhrd-show +++ b/utils/rhrd-show @@ -33,16 +33,16 @@ use RHRD::utils; sub print_usage { - print STDERR "Usage: rd-show list\n" . + print STDERR "Usage: rd-show list [ <group> ]\n" . " rd-show (show|remove) <show-id>\n" . " rd-show add <groupname> <name> <title> <num-carts> <rhythm> <dow> <starttime> <len>\n"; } sub list { - my ($ctx) = @_; + my ($ctx, $group) = @_; - my @shows = RHRD::rddb::list_shows($ctx); + my @shows = RHRD::rddb::list_shows($ctx, $group); if(!defined $shows[0] && defined $shows[1]) { print STDERR "$shows[1]: $shows[2]"; return 1; @@ -219,11 +219,11 @@ my $ret = 0; my ($ctx, $status, $errorstring) = RHRD::rddb::init(); if(defined $ctx) { if($cmd eq "list") { - if($num_args != 1) { + if($num_args > 2) { print_usage(); $ret = 1; } else { - $ret = list($ctx) + $ret = list($ctx, $ARGV[1]) } } elsif($cmd eq "show") { |