Arduino: warn but exit 0 if uninstall.sh missing

pull/904/head
Botspot 4 years ago
parent fe44f16e75
commit ea79bc6408

@ -9,9 +9,14 @@ function error {
VERSION=arduino-1.8.15
cd ~/.local/share
$VERSION/uninstall.sh || error "Failed to run uninstall.sh as $USER user"
sudo $VERSION/uninstall.sh || error "Failed to run uninstall.sh as root user"
rm -rf $VERSION || error "Failed to remove arduino-1.8.13 folder"
if [ -f ~/.local/share/$VERSION/uninstall.sh ];then
cd ~/.local/share
$VERSION/uninstall.sh || error "Failed to run uninstall.sh as $USER user"
sudo $VERSION/uninstall.sh || error "Failed to run uninstall.sh as root user"
rm -rf $VERSION || error "Failed to remove $VERSION folder"
cd
else
echo "WARNING: Arduino's uninstall.sh script was not found! Most likely it was never fully installed."
fi
exit 0

Loading…
Cancel
Save