Commit 0790ec8b authored by twanvl's avatar twanvl

Add check to gen.pl to prevent overwriting files

parent 1f618486
...@@ -22,6 +22,10 @@ $cpp =~ s@<util/prec.hpp>@$&\n#include <$file.hpp>@g; ...@@ -22,6 +22,10 @@ $cpp =~ s@<util/prec.hpp>@$&\n#include <$file.hpp>@g;
# write files # write files
if (-e "../src/$file.hpp" or -e "../src/$file.cpp") {
die "The output files already exist!";
}
open F, "> ../src/$file.hpp"; open F, "> ../src/$file.hpp";
print F $hpp; print F $hpp;
close F; close F;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment