aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmain.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.py b/main.py
index cd8abca..7b56501 100755
--- a/main.py
+++ b/main.py
@@ -9,6 +9,7 @@ import readline
from shutil import copy
import signal
import sys
+import os
from text import text
import datetime
import xml.etree.ElementTree
@@ -192,7 +193,11 @@ class C_Obj():
self.malloc = str
self.ancestry = ancestry
+def get_script_path():
+ return os.path.dirname(os.path.realpath(sys.argv[0]))
+
def dupemake(path, main_name):
+ os.chdir(get_script_path())
copy("./resources/makefile", path)
makefile_path = get_full_path(path, "makefile")
for line in fileinput.input(makefile_path, inplace=True):