summarylogtreecommitdiffstats
path: root/arduino-fix-arguments.patch
blob: 1cafeedde9ce74d748db77b3bf056ddd44db82d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
--- a/arduino	2013-04-11 13:31:37.000000000 +0200
+++ b/arduino	2014-01-12 15:18:46.159694131 +0100
@@ -2,6 +2,16 @@
  
 APPDIR="$(dirname -- "$(readlink -f -- "${0}")" )"
 
+args=()
+for arg in "$@"
+do
+    if [[ "$arg" == -* ]]; then
+        args+=("$arg")
+    else
+        args+=("$(realpath "$arg")")
+    fi
+done
+
 cd "$APPDIR"
  
 for LIB in \
@@ -19,4 +29,4 @@
 
 export PATH="${APPDIR}/java/bin:${PATH}"
 
-java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "$@"
+java -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel processing.app.Base "${args[@]}"