diff --git a/bytebeat_compiler.py b/bytebeat_compiler.py index d4c1e5e..53e41fc 100644 --- a/bytebeat_compiler.py +++ b/bytebeat_compiler.py @@ -4,7 +4,7 @@ if __name__ == "__main__": print(":: C bytebeat generator: compiler unit") from argparse import ArgumentParser -from os import environ, makedirs, name as os_name +from os import getcwd, environ, makedirs, name as os_name, rename from os.path import exists, join as path_join from shlex import join as command_line_join, split as command_line_split from shutil import which @@ -31,9 +31,10 @@ PATHS = { "include_directory": "include" } -# Add `.` directory before all paths for compilation +# Add current directory before all paths for compilation +CURRENT_DIRECTORY = getcwd() for key in ["src_dir", "bin_dir", "include_directory"]: - PATHS[key] = path_join(".", PATHS[key]) + PATHS[key] = path_join(CURRENT_DIRECTORY, PATHS[key]) # Resolve paths PATHS["template"] = path_join(PATHS["src_dir"], PATHS["template"])