1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-19 08:52:15 +01:00

Merge pull request #8781 from MrMebelMan/fix_linux_build_symlink_error

Linux build: remove symlinks only if they exist
This commit is contained in:
Martino Facchin 2019-04-15 10:47:30 +02:00 committed by GitHub
commit ad69480ce1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,8 +152,8 @@ xdg_uninstall_f() {
# Remove symlink for arduino
echo "" # Ensure password request message is on new line
if ! rm /usr/local/bin/arduino; then
echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
if [ -f /usr/local/bin/arduino ]; then
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
}
@ -189,8 +189,8 @@ simple_uninstall_f() {
# Remove symlink for arduino
echo "" # Ensure password request message is on new line
if ! rm /usr/local/bin/arduino; then
echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
if [ -f /usr/local/bin/arduino ]; then
rm /usr/local/bin/arduino || echo "Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
fi
}