From 461abd25b8b0d015c8d2a5dca01104e77d9a676d Mon Sep 17 00:00:00 2001 From: darkelaina <3550664-tretrauit@users.noreply.gitlab.com> Date: Tue, 21 Dec 2021 14:20:50 +0000 Subject: [PATCH] Don't uninstall if not installed --- Apps/BlockTheSpot/install.bash | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/Apps/BlockTheSpot/install.bash b/Apps/BlockTheSpot/install.bash index 316291a..21e46c4 100644 --- a/Apps/BlockTheSpot/install.bash +++ b/Apps/BlockTheSpot/install.bash @@ -31,13 +31,17 @@ if ! [ -d "$SPOTIFY" ]; then fi if [ "$1" == "uninstall" ]; then - echo "Uninstalling BlockTheSpot..." - for v in "${patchfiles[@]}" - do - rm "$SPOTIFY/$v" - done - mv "$SPOTIFY/chrome_elf_bak.dll" "$SPOTIFY/chrome_elf.dll" - echo "Uninstalling completed." + if [ -f "$SPOTIFY/chrome_elf_bak.dll" ]; then + echo "Uninstalling BlockTheSpot..." + for v in "${patchfiles[@]}" + do + rm "$SPOTIFY/$v" + done + mv "$SPOTIFY/chrome_elf_bak.dll" "$SPOTIFY/chrome_elf.dll" + echo "Uninstalling completed." + else + echo "Nothing to uninstall." + fi exit fi