Skip to content

Commit

Permalink
Follow symlinks when finding BIN_DIR.
Browse files Browse the repository at this point in the history
  • Loading branch information
ato committed Nov 22, 2009
1 parent 8470190 commit b1daf46
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/lein
Expand Up @@ -9,10 +9,10 @@ LEIN_JAR=$HOME/.m2/repository/leiningen/leiningen/$VERSION/leiningen-$VERSION.ja
# this needs to exist before the JVM is launched apparently
mkdir -p classes

BIN_DIR=`dirname $0`
BIN_DIR=$(dirname $(readlink -f $0))

if [ "$BIN_DIR" = "." ]; then
BIN_DIR=`dirname (which (basename $0))`
BIN_DIR=$(dirname $(readlink -f $(which $(basename $0))))
fi

if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then
Expand Down

0 comments on commit b1daf46

Please sign in to comment.