MangoHud/bin/mangohud-setup.sh

27 lines
862 B
Bash
Raw Normal View History

2020-03-10 12:39:52 +00:00
install() {
rm -rf "$HOME/.local/share/MangoHud/"
rm -f "$HOME/.local/share/vulkan/implicit_layer.d/"{mangohud32.json,mangohud64.json}
[ "$UID" -eq 0 ] || exec sudo bash "$0" install
2020-03-15 00:52:31 +00:00
tar -C / --no-overwrite-dir -xvhf MangoHud-package.tar
2020-03-10 12:39:52 +00:00
echo "MangoHud Installed"
}
uninstall() {
[ "$UID" -eq 0 ] || exec sudo bash "$0" uninstall
rm -rfv "/usr/lib/mangohud"
2020-03-14 12:12:51 +00:00
rm -fv "/usr/share/vulkan/implicit_layer.d/MangoHud.x86.json"
rm -fv "/usr/share/vulkan/implicit_layer.d/MangoHud.x86_64.json"
2020-03-14 12:17:40 +00:00
rm -frv "/usr/share/doc/mangohud"
2020-03-10 12:39:52 +00:00
rm -fv "/usr/bin/mangohud"
2020-03-14 12:12:51 +00:00
rm -fv "/usr/bin/mangohud.x86"
2020-03-10 12:39:52 +00:00
}
for a in $@; do
case $a in
"install") install;;
"uninstall") uninstall;;
*)
echo "Unrecognized command argument: $a"
echo 'Accepted arguments: "install", "uninstall".'
esac
done