dj0tt / arduino

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

Startup script fails on linux when parent directory contains a space character #994

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Unpack arduino-1.0.1 to a directory with a space in its name. (ie, 
/home/matt/Arduino Class/arduino-1.0.1)
2. Attempt to run the arduino launcher script from the install directory. (ie, 
cd /home/matt/Arduino\ Class/arduino-1.0.1; ./arduino)
3. Watch dirname complain about extra operands.
This behaviour occurs no matter how far removed the space-bearing parent 
directory is from the install directory.

What is the expected output? What do you see instead?
Arduino IDE should launch, but doesn't.

What version of the Arduino software are you using? On what operating
system?  Which Arduino board are you using?
Arduino 1.0.1, Ubuntu Linux 12.04 (though I imagine this bug should be 
reproducible on any linux distribution), board doesn't matter - IDE doesn't get 
that far.

Please provide any additional information below.

This is an easy fix. In the arduino launcher script, replace:
APPDIR="$(dirname -- $(readlink -f -- "${0}") )"
with:
APPDIR="$(dirname -- '$(readlink -f -- "${0}")' )"

I've attached a patch to implement this.

Original issue reported on code.google.com by matt.min...@gmail.com on 29 Jul 2012 at 8:46

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dmel...@gmail.com on 31 Jul 2012 at 10:55

GoogleCodeExporter commented 9 years ago
https://github.com/arduino/Arduino/commit/056ba5fca001fa8a4bec8430de1e81c76716ba
79

The single quotes didn't work for me, but this seems to.

Original comment by dmel...@gmail.com on 3 Nov 2012 at 4:38