Permalink
Browse files

Set the root directory of teeworlds as the main directory for scripts

  • Loading branch information...
1 parent 1850851 commit baa2e650a5e53303b13a8d0ffe50e30237cb403b @Sworddragon Sworddragon committed with oy May 6, 2011
Showing with 11 additions and 8 deletions.
  1. +4 −3 scripts/build.py
  2. +3 −2 scripts/copyright.py
  3. +4 −3 scripts/update_localization.py
View
@@ -9,6 +9,7 @@
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
+os.chdir('../')
url_bam = "http://github.com/matricks/bam/zipball/master"
url_teeworlds = "http://github.com/oy/teeworlds/zipball/master"
@@ -76,7 +77,7 @@
print("%s-%s-%s" % (name, version_teeworlds, platform))
root_dir = os.getcwd() + os.sep
-work_dir = root_dir + "work"
+work_dir = root_dir + "scripts/work"
def fetch_file(url):
try:
@@ -128,7 +129,7 @@ def bail(reason):
def clean():
print("*** cleaning ***")
- try: shutil.rmtree("work")
+ try: shutil.rmtree(work_dir)
except: pass
def file_exists(file):
@@ -150,7 +151,7 @@ def search_object(directory, object):
clean()
# make dir
-try: os.mkdir("work")
+try: os.mkdir(work_dir)
except: pass
# change dir
View
@@ -2,9 +2,10 @@
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
+os.chdir('../')
notice = [b"/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */\n", b"/* If you are missing that file, acquire a complete release at teeworlds.com. */\n"]
-exclude = ["../src%sengine%sexternal" % (os.sep, os.sep), "../src%sosxlaunch" % os.sep]
+exclude = ["src%sengine%sexternal" % (os.sep, os.sep), "src%sosxlaunch" % os.sep]
updated_files = 0
def fix_copyright_notice(filename):
@@ -42,7 +43,7 @@ def fix_copyright_notice(filename):
updated_files += 1
skip = False
-for root, dirs, files in os.walk("../src"):
+for root, dirs, files in os.walk("src"):
for excluding in exclude:
if root[:len(excluding)] == excluding:
skip = True
@@ -2,6 +2,7 @@
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
+os.chdir('../')
source_exts = [".c", ".cpp", ".h"]
@@ -13,7 +14,7 @@ def process_line(line):
stringtable[fields[0]] = ""
process_line(fields[1])
- for root, dirs, files in os.walk("../src"):
+ for root, dirs, files in os.walk("src"):
for name in files:
filename = os.path.join(root, name)
@@ -80,11 +81,11 @@ def generate_languagefile(outputfilename, srctable, loctable):
print("%-40s %8s %8s %8s" % ("filename", "total", "new", "old"))
-for filename in os.listdir("../data/languages"):
+for filename in os.listdir("data/languages"):
if not ".txt" in filename:
continue
if filename == "index.txt":
continue
- filename = "../data/languages/" + filename
+ filename = "data/languages/" + filename
generate_languagefile(filename, srctable, load_languagefile(filename))

0 comments on commit baa2e65

Please sign in to comment.