Perl script for defs: back up before changing

This commit is contained in:
Shahram Najm 2013-12-19 17:28:43 +00:00
parent 88a665d6a3
commit 5b693edd6b
1 changed files with 35 additions and 35 deletions

4
definitions/create_def.pl Normal file → Executable file
View File

@ -66,8 +66,8 @@ EOF
# or die ("unable to copy $filebase/$key.def");
print TAR "grib$edition$conceptDir/$key.def\n";
system("p4 edit $filebase/$key.def");
system("cp -f $filebase/$key.def $filebase/$key.def.orig");
#system("p4 edit $filebase/$key.def");
open($out,"> $filebase/$key.def")
or die "unable to open $filebase/$key.def";
print $out "# Automatically generated by $0 from database $db\@$host, do not edit\n";