From 38d3035920a50e4f7b26135b8a6bff048d94ad36 Mon Sep 17 00:00:00 2001 From: Adrian Wannenmacher Date: Sat, 13 Feb 2021 19:09:29 +0100 Subject: [PATCH] feat: :sparkles: improve install script and add unistall script --- install.fish | 8 +++++++- uninstall.fish | 17 +++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 uninstall.fish diff --git a/install.fish b/install.fish index adab4f5..6ae07c2 100755 --- a/install.fish +++ b/install.fish @@ -1,6 +1,12 @@ #!/bin/fish + cp ./src/snap-pac-uki.fish /usr/local/bin/snap-pac-uki -echo "installed creation script." +echo "installed script." + +if not test -d "/etc/snap-pac-uki" + mkdir -p "/etc/snap-pac-uki" + echo "created config dir." +end cp ./src/config.fish /etc/snap-pac-uki/config.fish echo "installed config script." diff --git a/uninstall.fish b/uninstall.fish new file mode 100644 index 0000000..14ed5a7 --- /dev/null +++ b/uninstall.fish @@ -0,0 +1,17 @@ +#!/bin/fish + +rm /usr/local/bin/snap-pac-uki +echo "removed script." + +rm /etc/snap-pac-uki/config.fish +echo "removed config script." + +for name in (ls ./pacman) + rm /usr/share/libalpm/hooks/$name +end +echo "removed pacman hooks." + +for name in (ls ./systemd) + rm /etc/systemd/system/$name +end +echo "removed systemd unit files"