2020-03-10 12:39:52 +00:00
|
|
|
install() {
|
2020-03-13 16:51:32 +00:00
|
|
|
rm -rf "$HOME/.local/share/MangoHud/"
|
2020-03-11 09:01:46 +00:00
|
|
|
rm -f "$HOME/.local/share/vulkan/implicit_layer.d/"{mangohud32.json,mangohud64.json}
|
2020-03-10 21:38:27 +00:00
|
|
|
[ "$UID" -eq 0 ] || exec sudo bash "$0" install
|
|
|
|
tar -C / -xvf MangoHud-package.tar
|
2020-03-10 12:39:52 +00:00
|
|
|
ldconfig
|
|
|
|
echo "MangoHud Installed"
|
|
|
|
}
|
|
|
|
|
|
|
|
uninstall() {
|
2020-03-10 21:38:27 +00:00
|
|
|
[ "$UID" -eq 0 ] || exec sudo bash "$0" uninstall
|
2020-03-11 17:01:59 +00:00
|
|
|
rm -rfv "/usr/lib/mangohud"
|
2020-03-10 12:39:52 +00:00
|
|
|
rm -fv "/usr/share/vulkan/implicit_layer.d/mangohud.json"
|
|
|
|
rm -fv "/etc/ld.so.conf.d/libmangohud.conf"
|
2020-03-11 17:01:59 +00:00
|
|
|
rm -fv "/etc/ld.so.conf.d/lib32-libmangohud.conf"
|
2020-03-10 12:39:52 +00:00
|
|
|
rm -fv "/usr/bin/mangohud"
|
|
|
|
}
|
|
|
|
|
|
|
|
for a in $@; do
|
|
|
|
case $a in
|
|
|
|
"install") install;;
|
|
|
|
"uninstall") uninstall;;
|
|
|
|
*)
|
|
|
|
echo "Unrecognized command argument: $a"
|
|
|
|
echo 'Accepted arguments: "install", "uninstall".'
|
|
|
|
esac
|
|
|
|
done
|