diff --git a/MAC_uninstall.sh b/MAC_uninstall.sh new file mode 100644 index 00000000..f4a359b9 --- /dev/null +++ b/MAC_uninstall.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Remove the app bundle +if [ -e /Applications/LogDoctor.app ] +then + sudo rm -r /Applications/LogDoctor.app + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove the app bundle: /Applications/LogDoctor" + fi +else + echo "Warning: app bundle not found" +fi + +# Remove the configurations file +if [ -e ~/Lybrary/Preferences/LogDoctor ] +then + rm -r ~/Lybrary/Preferences/LogDoctor + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove the configuration: "~/Lybrary/Preferences/LogDoctor + fi +else + echo "Warning: configurations folder not found" +fi + +# Remove app data +if [ -e ~/"Lybrary/Application Support/LogDoctor" ] +then + rm -r ~/"Lybrary/Application Support/LogDoctor" + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove LogDoctor's data and databases: "~/Lybrary/"Application Support/LogDoctor" + fi +else + echo "Warning: LogDoctor's data and databases folder not found" +fi + + +# Uninstallation finished +echo "Uninstallation finished" diff --git a/installation_stuff/osx_bundle/bin/LogDoctor_uninstall b/installation_stuff/osx_bundle/bin/LogDoctor_uninstall deleted file mode 100644 index e69de29b..00000000 diff --git a/installation_stuff/osx_bundle/bin/LogDoctor_uninstall.sh b/installation_stuff/osx_bundle/bin/LogDoctor_uninstall.sh new file mode 100644 index 00000000..f4a359b9 --- /dev/null +++ b/installation_stuff/osx_bundle/bin/LogDoctor_uninstall.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Remove the app bundle +if [ -e /Applications/LogDoctor.app ] +then + sudo rm -r /Applications/LogDoctor.app + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove the app bundle: /Applications/LogDoctor" + fi +else + echo "Warning: app bundle not found" +fi + +# Remove the configurations file +if [ -e ~/Lybrary/Preferences/LogDoctor ] +then + rm -r ~/Lybrary/Preferences/LogDoctor + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove the configuration: "~/Lybrary/Preferences/LogDoctor + fi +else + echo "Warning: configurations folder not found" +fi + +# Remove app data +if [ -e ~/"Lybrary/Application Support/LogDoctor" ] +then + rm -r ~/"Lybrary/Application Support/LogDoctor" + if [[ "$?" != "0" ]] + then + echo "Error: failed to remove LogDoctor's data and databases: "~/Lybrary/"Application Support/LogDoctor" + fi +else + echo "Warning: LogDoctor's data and databases folder not found" +fi + + +# Uninstallation finished +echo "Uninstallation finished"