X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=run-sbcl.sh;h=3788bd9798bb9fc6a42ca7fc642f5c7b38915bb8;hb=a129450e9b56cee8e307fc5c320105fe00ba45b7;hp=44aaf683e148ddfbb99a29672496be19fbb077fe;hpb=25c1769e30ff7404b52a9be663626d87f8ff75bc;p=sbcl.git diff --git a/run-sbcl.sh b/run-sbcl.sh index 44aaf68..3788bd9 100755 --- a/run-sbcl.sh +++ b/run-sbcl.sh @@ -13,23 +13,25 @@ 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 -if [ "$OSTYPE" = "cygwin" ] -then - BASE=`cygpath -w "$BASE"` -fi +this="$0" + +# OSX 10.8 readlink doesn't have -f +while [ -h "$this" ]; do + # [ -h should guarantee that readlink output will be non-null + link=`readlink -n "$this"` + # if absolute path + if expr "$link" : '^/.*' > /dev/null; then + this="$link" + else + this=`dirname "$this"`/"$link" + fi +done +BASE=`dirname "$this"` + CORE_DEFINED=no -for arg in $*; do - case $arg in +for arg in "$@"; do + case "$arg" in --core) CORE_DEFINED=yes ;;