summaryrefslogtreecommitdiff
path: root/utils/rhrd-show
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2015-10-09 17:40:46 (GMT)
committerChristian Pointner <equinox@spreadspace.org>2015-10-09 17:40:46 (GMT)
commitc253bf234deafa69ed2e462c8ec2d8f41b484e9e (patch)
tree27e4abb33d56ebf23ac0877baebfc0fde1cfa850 /utils/rhrd-show
parentc6c891b3921dce1cb3575e67a6f45f0fb24f722d (diff)
added some checks before drastic changes of a group
Diffstat (limited to 'utils/rhrd-show')
-rwxr-xr-xutils/rhrd-show10
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") {