Added/fixed directory changing

This commit is contained in:
Sworddragon 2011-04-02 04:47:19 +02:00 committed by oy
parent 5beae41043
commit 3e6b77b040
3 changed files with 8 additions and 5 deletions

View file

@ -6,9 +6,9 @@ if sys.version_info[0] == 2:
elif sys.version_info[0] == 3:
import urllib.request
url_lib = urllib.request
match = re.search("(.*?)/[^/]*?$", sys.argv[0])
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(os.getcwd() + "/" + match.group(1))
os.chdir(match.group(1))
url_bam = "http://github.com/matricks/bam/zipball/master"
url_teeworlds = "http://github.com/oy/teeworlds/zipball/master"

View file

@ -1,7 +1,7 @@
import os, re, sys
match = re.search("(.*?)/[^/]*?$", sys.argv[0])
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(os.getcwd() + "/" + match.group(1))
os.chdir(match.group(1))
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]

View file

@ -1,4 +1,7 @@
import shutil, os, sys, zipfile
import shutil, os, re, sys, zipfile
match = re.search('(.*)/', sys.argv[0])
if match != None:
os.chdir(match.group(1))
#valid_platforms = ["win32", "linux86", "linux86_64", "src"]