From 304288a5bc894023df2927af96fc2847bc2836d4 Mon Sep 17 00:00:00 2001 From: bloodstalker Date: Mon, 10 Sep 2018 17:23:36 +0430 Subject: update --- main.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.py') 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): -- cgit v1.2.3