Added MAC uninstallation script

This commit is contained in:
Valentino Orlandi 2022-12-07 12:17:04 +01:00
parent 0bfdf7f28f
commit 850245c9c2
Signed by: elB4RTO
GPG Key ID: 1719E976DB2D4E71
3 changed files with 82 additions and 0 deletions

41
MAC_uninstall.sh Normal file
View File

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

View File

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