Change directories to project root before calculating classpath.

This commit is contained in:
Phil Hagelberg 2010-08-11 18:22:25 -07:00
parent a8d7e8903b
commit b8b9b6c685

View file

@ -20,6 +20,16 @@ if [ $USER = "root" ] && [ "$LEIN_ROOT" == "" ]; then
read
fi
ORIGINAL_PWD=$PWD
while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ ! $NOT_FOUND ]
do
cd ..
if [ "$(dirname "$PWD")" == "/" ]; then
NOT_FOUND=0
cd "$ORIGINAL_PWD"
fi
done
if [ "$LEIN_HOME" = "" ]; then
LEIN_HOME="$HOME/.lein"
fi
@ -49,16 +59,6 @@ while [ -h "$SCRIPT" ] ; do
fi
done
ORIGINAL_PWD=$PWD
while [ ! -r "$PWD/project.clj" ] && [ "$PWD" != "/" ] && [ ! $NOT_FOUND ]
do
cd ..
if [ "$(dirname "$PWD")" == "/" ]; then
NOT_FOUND=0
cd "$ORIGINAL_PWD"
fi
done
BIN_DIR="$(dirname "$SCRIPT")"
if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then