Fix symlink resolution in run-sbcl.sh

Bug #1242643 reported by Stelian Ionescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

run-sbcl.sh fails to start when being executed via a symlink because it first computes the directory of argv[0] which it then resolves instead of doing it in the opposite order(first resolve argv[0] then compute the containing directory to find the source tree). Furthermore, it uses «readlink -f» which is not available on OSX.

Revision history for this message
Stelian Ionescu (sionescu) wrote :

The attached patch uses the POSIX tool expr to resolve symlinks in a portable fashion. It also replaces the use of $* with $@ because $* should never be used since it causes problems with arguments containing spaces. The idiom «"$@"» is equivalent to "$1" "$2" ..., i.e. APPLY.

Revision history for this message
Stelian Ionescu (sionescu) wrote :

I have tested that the patch works on Linux and OSX, but not Cygwin.

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.