feat: improve install script and add unistall script

This commit is contained in:
Adrian Wannenmacher 2021-02-13 19:09:29 +01:00
parent 52c785e844
commit 38d3035920
Signed by: tfld
GPG Key ID: 19D986ECB1E492D5
2 changed files with 24 additions and 1 deletions

View File

@ -1,6 +1,12 @@
#!/bin/fish #!/bin/fish
cp ./src/snap-pac-uki.fish /usr/local/bin/snap-pac-uki 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 cp ./src/config.fish /etc/snap-pac-uki/config.fish
echo "installed config script." echo "installed config script."

17
uninstall.fish Normal file
View File

@ -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"