|
1 | 1 | #!/bin/sh |
2 | 2 |
|
3 | | -# This script adds a menu item, icons and mime type for Arduino for the current |
4 | | -# user. If possible, it will use the xdg-utils - or fall back to just creating |
5 | | -# and copying a desktop file to the user's dir. |
6 | | -# If called with the "-u" option, it will undo the changes. |
| 3 | +# This script adds a menu item, icons and mime type for Processing for |
| 4 | +# the current user. If possible, it will use the xdg-utils - or fall back |
| 5 | +# to just creating and copying a desktop file to the user's directory. |
| 6 | +# If called with the "-u" option, it will uninstall. |
7 | 7 |
|
8 | 8 | # Resource name to use (including vendor prefix) |
9 | | -RESOURCE_NAME=processing-processingide |
| 9 | +RESOURCE_NAME=processing-pde |
10 | 10 |
|
11 | 11 | # Get absolute path from which this script file was executed |
12 | 12 | # (Could be changed to "pwd -P" to resolve symlinks to their target) |
@@ -61,7 +61,7 @@ xdg_install_f() { |
61 | 61 | xdg-icon-resource install --context mimetypes --size 512 "${SCRIPT_PATH}/lib/icons/pde-512.png" text-x-processing |
62 | 62 | xdg-icon-resource install --context mimetypes --size 1024 "${SCRIPT_PATH}/lib/icons/pde-1024.png" text-x-processing |
63 | 63 |
|
64 | | - # Make Processing IDE the default application for *.pde |
| 64 | + # Make the Processing Development Environment the default app for *.pde files |
65 | 65 | xdg-mime default ${RESOURCE_NAME}.desktop text/x-processing |
66 | 66 |
|
67 | 67 | # Clean up |
@@ -128,7 +128,7 @@ xdg_uninstall_f() { |
128 | 128 | xdg-icon-resource uninstall --size 512 text-x-processing |
129 | 129 | xdg-icon-resource uninstall --size 1024 text-x-processing |
130 | 130 |
|
131 | | - # Remove Arduino MIME type |
| 131 | + # Remove MIME type |
132 | 132 | xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml" |
133 | 133 |
|
134 | 134 | } |
@@ -194,7 +194,7 @@ xdg_exists_f() { |
194 | 194 |
|
195 | 195 | # Shows a description of the available options |
196 | 196 | display_help_f() { |
197 | | - printf "\nThis script will add a Processing IDE desktop shortcut, menu item,\n" |
| 197 | + printf "\nThis script will add a Processing desktop shortcut, menu item,\n" |
198 | 198 | printf "icons and file associations for the current user.\n" |
199 | 199 | if ! xdg_exists_f; then |
200 | 200 | printf "\nxdg-utils are recommended to be installed, so this script can use them.\n" |
@@ -227,21 +227,21 @@ done |
227 | 227 | # If possible, use xdg-utils, if not, use a more basic approach |
228 | 228 | if xdg_exists_f; then |
229 | 229 | if [ ${UNINSTALL} = true ]; then |
230 | | - printf "Removing desktop shortcut and menu item for Processing IDE..." |
| 230 | + printf "Removing desktop shortcut and menu item for Processing..." |
231 | 231 | xdg_uninstall_f |
232 | 232 | simple_uninstall_f |
233 | 233 | else |
234 | | - printf "Adding desktop shortcut, menu item and file associations for Processing IDE..." |
| 234 | + printf "Adding desktop shortcut, menu item and file associations for Processing..." |
235 | 235 | xdg_uninstall_f |
236 | 236 | simple_uninstall_f |
237 | 237 | xdg_install_f |
238 | 238 | fi |
239 | 239 | else |
240 | 240 | if [ ${UNINSTALL} = true ]; then |
241 | | - printf "Removing desktop shortcut and menu item for Processing IDE..." |
| 241 | + printf "Removing desktop shortcut and menu item for Processing..." |
242 | 242 | simple_uninstall_f |
243 | 243 | else |
244 | | - printf "Adding desktop shortcut and menu item for Processing IDE..." |
| 244 | + printf "Adding desktop shortcut and menu item for Processing..." |
245 | 245 | simple_uninstall_f |
246 | 246 | simple_install_f |
247 | 247 | fi |
|
0 commit comments