]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - generic_h.py
some more clip shader names
[xonotic/netradiant.git] / generic_h.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 createHeaderTemplate(filename, name):\r
29   file = open(filename, "wt")\r
30   file.write("\n")\r
31   file.write("#if !defined(_INCLUDED_" + name.upper() + "_H_)\n")\r
32   file.write("#define _INCLUDED_" + name.upper() + "_H_\n")\r
33   file.write("\n")\r
34   file.write("#endif\n")\r
35 \r
36 if __name__ == "__main__":\r
37   name = sys.argv[1]\r
38   location = sys.argv[2]\r
39   filename = os.path.join(location, name + ".h")\r
40   createHeaderTemplate(filename, name)\r
41   svnAddText(filename)\r