mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-01 12:24:14 +01:00
Add symlink creation and removal lines. This will need sudoers password.
This commit is contained in:
parent
41008f9a87
commit
e20c648b09
12
build/linux/dist/install.sh
vendored
12
build/linux/dist/install.sh
vendored
@ -66,6 +66,9 @@ xdg_install_f() {
|
||||
# Make Arduino IDE the default application for *.ino
|
||||
xdg-mime default ${RESOURCE_NAME}.desktop text/x-arduino
|
||||
|
||||
# Add symlink for arduino so it's in users path
|
||||
sudo ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino
|
||||
|
||||
# Clean up
|
||||
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
|
||||
rmdir "$TMP_DIR"
|
||||
@ -98,6 +101,9 @@ simple_install_f() {
|
||||
chmod u+x "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
||||
fi
|
||||
|
||||
# Add symlink for arduino so it's in users path
|
||||
sudo ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino
|
||||
|
||||
# Clean up temp dir
|
||||
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
|
||||
rmdir "${TMP_DIR}"
|
||||
@ -138,6 +144,9 @@ xdg_uninstall_f() {
|
||||
# Remove Arduino MIME type
|
||||
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
|
||||
|
||||
# Remove symlink for arduino
|
||||
sudo rm /usr/local/bin/arduino
|
||||
|
||||
}
|
||||
|
||||
# Uninstall by simply removing desktop files (fallback), incl. old one
|
||||
@ -169,6 +178,9 @@ simple_uninstall_f() {
|
||||
rm "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
|
||||
fi
|
||||
|
||||
# Remove symlink for arduino
|
||||
sudo rm /usr/local/bin/arduino
|
||||
|
||||
}
|
||||
|
||||
# Update desktop file and mime databases (if possible)
|
||||
|
Loading…
Reference in New Issue
Block a user