diff options
author | Swedish Language Team <swedish> | 2000-05-17 21:42:04 +0000 |
---|---|---|
committer | Swedish Language Team <swedish> | 2000-05-17 21:42:04 +0000 |
commit | 77b7746cc94f721ebd9141c9ff06d4c8c095051e (patch) | |
tree | 93a2149e18e2a876576aed9fed354788c956d9c4 /copypage.pl | |
parent | d7a72f661ce0372a4c5eebb3bea7e84673826c71 (diff) |
Does not overwrite if destination file exists
CVS version numbers
copypage.pl: 1.3 -> 1.4
swedish/News/weekly/copyissue.pl: 1.2 -> 1.3
swedish/security/copyadvisory.pl: 1.1 -> 1.2
Diffstat (limited to 'copypage.pl')
-rwxr-xr-x | copypage.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/copypage.pl b/copypage.pl index fdb53a3ca12..eae864cebb7 100755 --- a/copypage.pl +++ b/copypage.pl @@ -28,11 +28,11 @@ else # Check usage. unless ($page) { - print "Usage: $0 page\n"; + print "Usage: $0 page\n\n"; print "Copies the page from the english/ directory to the $language/ directory\n"; print "and adds the translation string\n"; print "If the directory does not exist, it will be created, and the Makefile\n"; - print "copied.\n"; + print "copied.\n\n"; print "You can either keep or not keep the 'english/' part of the path.\n"; exit; } @@ -70,6 +70,7 @@ $dstmake = $dstdir . "Makefile"; # Name of destination Makefile # Sanity checks die "Directory $srcdir does not exist\n" unless -d $srcdir; die "File $srcfile does not exist\n" unless -e $srcfile; +die "File $dstfile already exists\n" if -e $dstfile; # Check if destination exists, if not - create it unless (-d $dstdir) |