aboutsummaryrefslogtreecommitdiff
path: root/renrot
diff options
context:
space:
mode:
Diffstat (limited to 'renrot')
-rwxr-xr-xrenrot47
1 files changed, 13 insertions, 34 deletions
diff --git a/renrot b/renrot
index 3fbbf31..f1dc4ec 100755
--- a/renrot
+++ b/renrot
@@ -303,4 +303,2 @@ sub die_renrot {
303sub getOptions { 303sub getOptions {
304 my $showVersion = 0; # need version
305 my $showHelp = 0; # need help
306 my @tmpTags = (); 304 my @tmpTags = ();
@@ -328,3 +326,3 @@ sub getOptions {
328 326
329 my $getOptions = GetOptions ( 327 GetOptions (
330 # AGGREGATION 328 # AGGREGATION
@@ -386,3 +384,3 @@ sub getOptions {
386 "generate-thumb|g" => \$gen_thm, 384 "generate-thumb|g" => \$gen_thm,
387 "help|?" => \$showHelp, 385 "help|?" => sub { usage(0, 2) },
388 "no-rename|norename" => \$noRename, 386 "no-rename|norename" => \$noRename,
@@ -399,5 +397,5 @@ sub getOptions {
399 "v+" => \$verbose, 397 "v+" => \$verbose,
400 "version" => \$showVersion, 398 "version" => sub { usage(0, 0) },
401 "work-directory|d=s" => \$workDir, 399 "work-directory|d=s" => \$workDir,
402 ); 400 ) or usage(1, 1);
403 401
@@ -449,12 +447,2 @@ sub getOptions {
449 447
450 if ($showHelp != 0) {
451 usage();
452 exit 0;
453 }
454
455 if ($showVersion != 0) {
456 infomsg ("RenRot version $VERSION (r$REVISION)\n");
457 exit 0;
458 }
459
460 if ($extToProcess eq "" and ($fileCount == 0) and $subFileSet eq "") { 448 if ($extToProcess eq "" and ($fileCount == 0) and $subFileSet eq "") {
@@ -468,7 +456,2 @@ sub getOptions {
468 456
469 if ($getOptions == 0) {
470 usage();
471 exit 1;
472 }
473
474 if ($noRenRoTagMtm != 0) { 457 if ($noRenRoTagMtm != 0) {
@@ -1577,11 +1560,8 @@ sub rotateThumbnail {
1577sub usage { 1560sub usage {
1578 # catch warnings if we have problems running perldoc 1561 my $exitcode = shift;
1579 my $evalWarning; 1562 my $verbose = shift;
1580 local $SIG{'__WARN__'} = sub { $evalWarning = $_[0] }; 1563
1581 my $dummy = \*SAVEERR; # avoid "used only once" warning 1564 if ($verbose == 0) {
1582 unless ($^O eq 'os2') { 1565 infomsg ("RenRot version $VERSION (r$REVISION)\n");
1583 open SAVEERR, ">&STDERR"; 1566 } elsif ($verbose == 1) {
1584 open STDERR, '>/dev/null';
1585 }
1586 if (system('perldoc', $0)) {
1587 infomsg ( 1567 infomsg (
@@ -1620,7 +1600,6 @@ Consult the documentation for a full list of options.
1620"); 1600");
1601 } elsif ($verbose == 2) {
1602 pod2usage(-verbose => 2);
1621 } 1603 }
1622 unless ($^O eq 'os2') { 1604 exit $exitcode;
1623 close STDERR;
1624 open STDERR, '>&SAVEERR';
1625 }
1626} 1605}

Return to:

Send suggestions and report system problems to the System administrator.