From: alex Date: Sun, 7 May 2023 09:48:18 +0000 (+0000) Subject: Deploy dotfiles X-Git-Tag: 20240214-emacs~360 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=be2e5d5ed2f7a8c77b6ce5d871f21c5640ee5748;p=alex.git Deploy dotfiles --- 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) +