]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - generic_cpp.py
don't bounce from trans surfaces
[xonotic/netradiant.git] / generic_cpp.py
1 # Copyright (C) 2001-2006 William Joseph.\r
2 # For a list of contributors, see the accompanying CONTRIBUTORS file.\r
3\r
4 # This file is part of GtkRadiant.\r
5\r
6 # GtkRadiant is free software; you can redistribute it and/or modify\r
7 # it under the terms of the GNU General Public License as published by\r
8 # the Free Software Foundation; either version 2 of the License, or\r
9 # (at your option) any later version.\r
10\r
11 # GtkRadiant is distributed in the hope that it will be useful,\r
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of\r
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
14 # GNU General Public License for more details.\r
15\r
16 # You should have received a copy of the GNU General Public License\r
17 # along with GtkRadiant; if not, write to the Free Software\r
18 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA\r
19 \r
20 \r
21 import os\r
22 import sys\r
23 \r
24 def svnAddText(filename):\r
25   os.system("svn add " + filename);\r
26   os.system("svn ps svn:eol-style native " + filename);\r
27 \r
28 def createCPPTemplate(filename, name):\r
29   file = open(filename, "wt")\r
30   file.write("\n")\r
31   file.write("#include \"" + name + ".h\"\n")\r
32   file.write("\n")\r
33   file.close()\r
34 \r
35 if __name__ == "__main__":\r
36   name = sys.argv[1]\r
37   location = sys.argv[2]\r
38   filename = os.path.join(location, name + ".cpp")\r
39   createCPPTemplate(filename, name)\r
40   svnAddText(filename)\r