From: alex Date: Tue, 21 May 2024 11:09:15 +0000 (+0200) Subject: Make more idempotent X-Git-Tag: 20241020-emacs~181 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=de30ba3fc6c6d68399ecb84b4115c253aacd4ed7;p=alex.git Make more idempotent --- diff --git a/scripts/p7s/emacs.py b/scripts/p7s/emacs.py index c27001f..9eba95f 100644 --- a/scripts/p7s/emacs.py +++ b/scripts/p7s/emacs.py @@ -5,7 +5,7 @@ import p7s def setup_emacs(): p7s.BASHRC_D.mkdir(parents=True, exist_ok=True) - (p7s.BASHRC_D / "emacs.bash").unlink() + (p7s.BASHRC_D / "emacs.bash").unlink(missing_ok=True) subprocess.run(["ln", "-s", (pathlib.Path(__file__).parent.parent.parent / "emacs" / "emacs.bash").absolute(), p7s.BASHRC_D / "emacs.bash"], check=True) - (pathlib.Path.home() / ".emacs").unlink() + (pathlib.Path.home() / ".emacs").unlink(missing_ok=True) subprocess.run(["ln", "-s", (pathlib.Path(__file__).parent.parent.parent / "emacs" / "emacs.el").absolute(), pathlib.Path.home() / ".emacs"], check=True)