diff options
author | Josip Rodin <joy> | 2000-11-12 20:01:27 +0000 |
---|---|---|
committer | Josip Rodin <joy> | 2000-11-12 20:01:27 +0000 |
commit | ed3a73ebccdffa5938e442b958b69aa36a5fa36e (patch) | |
tree | 6b47c4bef6b6c8a3db21f394ea43a122e3088dc0 | |
parent | ae414b841e05e96f19ebb21e4941b770c7bc8f79 (diff) |
moved $language setting before usage message otherwise Perl prints a warning about uninitialized variable; minor fixes in the message
CVS version numbers
copypage.pl: 1.5 -> 1.6
-rwxr-xr-x | copypage.pl | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/copypage.pl b/copypage.pl index b04ca993c7c..47c25a18db9 100755 --- a/copypage.pl +++ b/copypage.pl @@ -11,18 +11,6 @@ # $Id$ -# Check usage. -if ($#ARGV == -1) -{ - print "Usage: $0 page ...\n\n"; - print "Copies the page from the english/ directory to the $language/ directory\n"; - print "and adds the translation-check header\n"; - print "If the directory does not exist, it will be created, and the Makefile\n"; - print "copied.\n\n"; - print "You can either keep or not keep the 'english/' part of the path.\n"; - exit; -} - # Get configuration if (open CONF, "<language.conf") { @@ -35,7 +23,19 @@ else $language = 'swedish'; } -# Loop over commnad line +# Check usage. +if ($#ARGV == -1) +{ + print "Usage: $0 page ...\n\n"; + print "Copies the page from the english/ directory to the $language/ directory\n"; + print "and adds the translation-check header with the current revision.\n"; + print "If the directory does not exist, it will be created, and the Makefile\n"; + print "copied.\n\n"; + print "You can either keep or not keep the 'english/' part of the path.\n"; + exit; +} + +# Loop over command line foreach $page (@ARGV) { # Check if valid source @@ -49,7 +49,6 @@ foreach $page (@ARGV) } } - # Subroutine to copy a page sub copy { |