aboutsummaryrefslogtreecommitdiffstats
path: root/main.py
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2018-09-10 12:53:36 +0000
committerbloodstalker <thabogre@gmail.com>2018-09-10 12:53:36 +0000
commit304288a5bc894023df2927af96fc2847bc2836d4 (patch)
tree61adca3a78097c353747dbdb6b5b8e87be2be590 /main.py
parentupdate (diff)
downloadfaultreiber-304288a5bc894023df2927af96fc2847bc2836d4.tar.gz
faultreiber-304288a5bc894023df2927af96fc2847bc2836d4.zip
update
Diffstat (limited to '')
-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):