aboutsummaryrefslogtreecommitdiffstats
path: root/copypage.pl
diff options
context:
space:
mode:
authorJosip Rodin <joy>2000-11-12 20:01:27 +0000
committerJosip Rodin <joy>2000-11-12 20:01:27 +0000
commited3a73ebccdffa5938e442b958b69aa36a5fa36e (patch)
tree6b47c4bef6b6c8a3db21f394ea43a122e3088dc0 /copypage.pl
parentae414b841e05e96f19ebb21e4941b770c7bc8f79 (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
Diffstat (limited to 'copypage.pl')
-rwxr-xr-xcopypage.pl27
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
{

© 2014-2024 Faster IT GmbH | imprint | privacy policy