Skip to content

Linux build: remove symlinks only if they exist #8781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 15, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions build/linux/dist/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

}
Expand Down Expand Up @@ -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

}
Expand Down