From fd14efb7739961cf2d15057b96ef376c046e80f6 Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Sun, 23 Feb 2025 21:23:34 +1100 Subject: install: better link install Remove links if not already linked before linking --- install/util.fish | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'install/util.fish') diff --git a/install/util.fish b/install/util.fish index ad62230..d9a02f5 100644 --- a/install/util.fish +++ b/install/util.fish @@ -108,3 +108,10 @@ WantedBy=default.target" > $systemd/$module-monitor-scheme.path systemctl --user start $module-monitor-scheme.service end end + +function install-link -a from to + if ! test -L $to -a (realpath $to) = (realpath $from) + confirm-overwrite $to + ln -s $from $to + end +end -- cgit v1.2.3-freya