@@ -52,6 +52,9 @@ xdg_install_f() {
52
52
# Install Arduino mime type
53
53
xdg-mime install " ${SCRIPT_PATH} /lib/${RESOURCE_NAME} .xml"
54
54
55
+ mkdir -p " ${HOME} /.local/share/metainfo"
56
+ cp " ${SCRIPT_PATH} /appdata.xml" " ${HOME} /.local/share/metainfo/${RESOURCE_NAME} .appdata.xml"
57
+
55
58
# Install icons for mime type
56
59
xdg-icon-resource install --context mimetypes --size 16 " ${SCRIPT_PATH} /lib/icons/16x16/apps/arduino.png" text-x-arduino
57
60
xdg-icon-resource install --context mimetypes --size 24 " ${SCRIPT_PATH} /lib/icons/24x24/apps/arduino.png" text-x-arduino
@@ -71,7 +74,6 @@ xdg_install_f() {
71
74
fi
72
75
73
76
# Add symlink for arduino so it's in users path
74
- echo " " # Ensure password request message is on new line
75
77
if ! ln -s ${SCRIPT_PATH} /arduino /usr/local/bin/arduino; then
76
78
echo " Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
77
79
fi
@@ -112,7 +114,6 @@ simple_install_f() {
112
114
fi
113
115
114
116
# Add symlink for arduino so it's in users path
115
- echo " " # Ensure password request message is on new line
116
117
if ! ln -s ${SCRIPT_PATH} /arduino /usr/local/bin/arduino; then
117
118
echo " Adding symlink failed. Hope that's OK. If not then rerun as root with sudo."
118
119
fi
@@ -157,8 +158,11 @@ xdg_uninstall_f() {
157
158
# Remove Arduino MIME type
158
159
xdg-mime uninstall " ${SCRIPT_PATH} /lib/${RESOURCE_NAME} .xml"
159
160
161
+ if [ -f " ${HOME} /.local/share/metainfo/${RESOURCE_NAME} .appdata.xml" ]; then
162
+ rm " ${HOME} /.local/share/metainfo/${RESOURCE_NAME} .appdata.xml"
163
+ fi
164
+
160
165
# Remove symlink for arduino
161
- echo " " # Ensure password request message is on new line
162
166
if [ -f /usr/local/bin/arduino ]; then
163
167
rm /usr/local/bin/arduino || echo " Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
164
168
fi
@@ -195,7 +199,6 @@ simple_uninstall_f() {
195
199
fi
196
200
197
201
# Remove symlink for arduino
198
- echo " " # Ensure password request message is on new line
199
202
if [ -f /usr/local/bin/arduino ]; then
200
203
rm /usr/local/bin/arduino || echo " Removing symlink failed. Hope that's OK. If not then rerun as root with sudo."
201
204
fi
0 commit comments