mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-09 20:47:00 -04:00
Add check to gen.pl to prevent overwriting files
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@913 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -22,6 +22,10 @@ $cpp =~ s@<util/prec.hpp>@$&\n#include <$file.hpp>@g;
|
||||
|
||||
# write files
|
||||
|
||||
if (-e "../src/$file.hpp" or -e "../src/$file.cpp") {
|
||||
die "The output files already exist!";
|
||||
}
|
||||
|
||||
open F, "> ../src/$file.hpp";
|
||||
print F $hpp;
|
||||
close F;
|
||||
|
||||
Reference in New Issue
Block a user