summaryrefslogtreecommitdiff
path: root/install/util.fish
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-23 21:23:34 +1100
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-02-23 21:23:34 +1100
commitfd14efb7739961cf2d15057b96ef376c046e80f6 (patch)
treed8dcace910ce07f7ace251d5dc96e4aace1eb88c /install/util.fish
parentscheme: light/dark mode (diff)
downloadcaelestia-cli-fd14efb7739961cf2d15057b96ef376c046e80f6.tar.gz
caelestia-cli-fd14efb7739961cf2d15057b96ef376c046e80f6.tar.bz2
caelestia-cli-fd14efb7739961cf2d15057b96ef376c046e80f6.zip
install: better link install
Remove links if not already linked before linking
Diffstat (limited to 'install/util.fish')
-rw-r--r--install/util.fish7
1 files changed, 7 insertions, 0 deletions
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