From be2e5d5ed2f7a8c77b6ce5d871f21c5640ee5748 Mon Sep 17 00:00:00 2001 From: alex Date: Sun, 7 May 2023 09:48:18 +0000 Subject: [PATCH] Deploy dotfiles --- workstation/setup.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/workstation/setup.py b/workstation/setup.py index f1fbea9..b2684ae 100755 --- a/workstation/setup.py +++ b/workstation/setup.py @@ -42,3 +42,13 @@ subprocess.run(["systemctl", "--user", "enable", "--now", "nextcloud"], check=Tr if not (pathlib.Path.home() / ".ssh").exists(): subprocess.run(["ln", "-s", "Nextcloud/_ssh", ".ssh"], check=True) + + +dotfiles_dir = pathlib.Path.home() / "Nextcloud" / "dotfiles" + +for dotfile in dotfiles_dir.glob("*"): + relative_dotfile = dotfile.relative_to(dotfiles_dir) + replaced_dotfile = pathlib.Path.home() / ("." + relative_dotfile.parts[0][1:]) + if not replaced_dotfile.exists(): + subprocess.run(["ln", "-s", dotfile, replaced_dotfile], check=True) + -- 2.47.3