diff options
| author | Sworddragon <sworddragon2@aol.com> | 2011-04-02 04:47:19 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2011-04-03 22:33:47 +0200 |
| commit | 3e6b77b0409d05d5ed19c61e24246ed2a88b65e7 (patch) | |
| tree | 5831fd4e0f8d1b6c705ba855f7817fc523aab314 /scripts | |
| parent | 5beae410430e9bf5f6813c7ffa552d7cd3417477 (diff) | |
| download | zcatch-3e6b77b0409d05d5ed19c61e24246ed2a88b65e7.tar.gz zcatch-3e6b77b0409d05d5ed19c61e24246ed2a88b65e7.zip | |
Added/fixed directory changing
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build.py | 4 | ||||
| -rwxr-xr-x | scripts/copyright.py | 4 | ||||
| -rw-r--r-- | scripts/make_release.py | 5 |
3 files changed, 8 insertions, 5 deletions
diff --git a/scripts/build.py b/scripts/build.py index 4e86d16b..0fa0bd2b 100644 --- a/scripts/build.py +++ b/scripts/build.py @@ -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" diff --git a/scripts/copyright.py b/scripts/copyright.py index 29e1bbfe..fade0b13 100755 --- a/scripts/copyright.py +++ b/scripts/copyright.py @@ -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] diff --git a/scripts/make_release.py b/scripts/make_release.py index f9ff9e94..b056bc4e 100644 --- a/scripts/make_release.py +++ b/scripts/make_release.py @@ -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"] |