Boo0ns / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

Linux startup script fails if "arduino" is a link. #353

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Please apply the following patch:

--- arduino-0019/arduino.orig   2010-09-04 11:43:29.000000000 +1200
+++ arduino-0019/arduino        2010-09-20 21:30:10.000000000 +1200
@@ -1,6 +1,7 @@
 #!/bin/sh

-APPDIR="$(dirname -- "${0}")"
+#APPDIR="$(dirname -- "${0}")"
+APPDIR="$(dirname -- $(readlink -f -- "${0}") )"

 cd $APPDIR

Benefit: The IDE starts up, instead of crashing, when started via a symlink 
pointing to arduino-0019/arduino
This is needed to be able to install the IDE cleanly by unpacking the 
distributed tar file into some directory, and placing a symlink in 
/usr/local/bin pointing to the arduino-00xx/arduino script, like so:

  /usr/local/bin/arduino -> ../pckg/arduino/arduino
  /usr/local/pckg/arduino/arduino-0019/arduino

This then also solves the $PATH problem.
OS: Linux.

Thanks!

Original issue reported on code.google.com by gooc...@top.geek.nz on 20 Sep 2010 at 10:03

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 5 Oct 2010 at 1:30

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/300f5e2ed04fa195cf14c6459996e2e963e736
5d

Original comment by dmel...@gmail.com on 24 Dec 2010 at 10:04