[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.13,1.14
From: |
Ambrose Li |
Subject: |
[Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.13,1.14 |
Date: |
Thu, 12 Feb 2004 17:20:05 -0800 |
Update of /cvsroot/koha/koha/misc/translator
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30334
Modified Files:
text-extract2.pl
Log Message:
Display something useful if the user doesn't specify -f
Index: text-extract2.pl
===================================================================
RCS file: /cvsroot/koha/koha/misc/translator/text-extract2.pl,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** text-extract2.pl 13 Feb 2004 01:14:18 -0000 1.13
--- text-extract2.pl 13 Feb 2004 01:20:03 -0000 1.14
***************
*** 266,269 ****
--- 266,279 ----
}
+
###############################################################################
+
+ sub usage_error (;$) {
+ print STDERR "$_[0]\n" if @_;
+ print STDERR "Try `$0 --help' for more information.\n";
+ exit(-1);
+ }
+
+
###############################################################################
+
GetOptions(
'f|file=s' => \$input,
***************
*** 271,275 ****
'pedantic-warnings' => sub { $pedantic_p = 1 },
'help' => sub { usage(0) },
! ) || exit(-1);
open(INPUT, "<$input") || die "$0: $input: $!\n";
--- 281,286 ----
'pedantic-warnings' => sub { $pedantic_p = 1 },
'help' => sub { usage(0) },
! ) || usage_error;
! usage_error('Missing mandatory option -f') unless defined $input;
open(INPUT, "<$input") || die "$0: $input: $!\n";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/misc/translator text-extract2.pl,1.13,1.14,
Ambrose Li <=