Skip to content

Commit e20c648

Browse files
2E0PGSfacchinm
authored andcommitted
Add symlink creation and removal lines. This will need sudoers password.
1 parent 41008f9 commit e20c648

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

build/linux/dist/install.sh

+12
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ xdg_install_f() {
6666
# Make Arduino IDE the default application for *.ino
6767
xdg-mime default ${RESOURCE_NAME}.desktop text/x-arduino
6868

69+
# Add symlink for arduino so it's in users path
70+
sudo ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino
71+
6972
# Clean up
7073
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
7174
rmdir "$TMP_DIR"
@@ -98,6 +101,9 @@ simple_install_f() {
98101
chmod u+x "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
99102
fi
100103

104+
# Add symlink for arduino so it's in users path
105+
sudo ln -s ${SCRIPT_PATH}/arduino /usr/local/bin/arduino
106+
101107
# Clean up temp dir
102108
rm "${TMP_DIR}/${RESOURCE_NAME}.desktop"
103109
rmdir "${TMP_DIR}"
@@ -138,6 +144,9 @@ xdg_uninstall_f() {
138144
# Remove Arduino MIME type
139145
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
140146

147+
# Remove symlink for arduino
148+
sudo rm /usr/local/bin/arduino
149+
141150
}
142151

143152
# Uninstall by simply removing desktop files (fallback), incl. old one
@@ -169,6 +178,9 @@ simple_uninstall_f() {
169178
rm "${XDG_DESKTOP_DIR}/${RESOURCE_NAME}.desktop"
170179
fi
171180

181+
# Remove symlink for arduino
182+
sudo rm /usr/local/bin/arduino
183+
172184
}
173185

174186
# Update desktop file and mime databases (if possible)

0 commit comments

Comments
 (0)