diff --git a/src/installer.py b/src/installer.py index 76b06b9..6d854e5 100644 --- a/src/installer.py +++ b/src/installer.py @@ -9,22 +9,22 @@ from pathlib import Path def install(parsed) -> None: args = parsed.parse_args() if args.install: - projectDir = str(Path(__file__).resolve().parent.parent) + projectDir = Path(__file__).resolve().parent.parent homeDir = os.getenv("HOME") serviceDirExist = os.path.isdir(homeDir + "/.config/systemd/user/") delivered = False if serviceDirExist: delivered = filecmp.cmp( - projectDir + "/services/wthrc.service", + os.path.join(projectDir, "services/wthrc.service"), homeDir + "/.config/systemd/user/wthrc.service", shallow=True, ) if not delivered or not serviceDirExist: os.environ["DIR"] = projectDir - subprocess.call(["sh", projectDir + "/scripts/install.sh"]) - subprocess.call(["sh", projectDir + "/scripts/runner.sh"]) + subprocess.call(["sh", os.path.join(projectDir, "scripts/install.sh")]) + subprocess.call(["sh", os.path.join(projectDir, "scripts/runner.sh")]) sleep(5) else: