about summary refs log tree commit diff
path: root/scripts/copyright.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/copyright.py')
-rwxr-xr-xscripts/copyright.py4
1 files changed, 2 insertions, 2 deletions
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]