1.0.42.32: fix for lp#611361
[sbcl.git] / run-sbcl.sh
index f1876c3..26dc406 100644 (file)
 set -e
 
 BASE=`dirname "$0"`
+if (readlink -f "${BASE}") >/dev/null 2>&1; then
+    BASE=`readlink -f ${BASE}`
+else
+    opwd=`pwd`
+    cd "${BASE}"
+    BASE=`pwd`
+    cd "${opwd}"
+fi
 CORE_DEFINED=no
 
 for arg in $*; do
     case $arg in
-        (--core)
+        --core)
           CORE_DEFINED=yes
           ;;
-        (--help)
+        --help)
           echo "usage: run-sbcl.sh sbcl-options*"
           echo
           echo "Runs SBCL from the build directory or binary tarball without need for"