aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authoralex <alex@pdp7.net>2024-05-21 13:09:15 +0200
committeralex <alex@pdp7.net>2024-05-21 13:09:15 +0200
commitde30ba3fc6c6d68399ecb84b4115c253aacd4ed7 (patch)
tree27a8358d9b805ba6162b952172534dfcab124cfa /scripts
parentcf021eb6c1fc46b181798a15171da68981874748 (diff)
Make more idempotent
Diffstat (limited to 'scripts')
-rw-r--r--scripts/p7s/emacs.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/p7s/emacs.py b/scripts/p7s/emacs.py
index c27001f2..9eba95f9 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)