parent
f7f588b739
commit
c6e95593c4
2 changed files with 18 additions and 18 deletions
|
@ -43,19 +43,19 @@ functionality they change are especially welcome.
|
|||
|
||||
## Bootstrapping
|
||||
|
||||
You don't need to "build" Leiningen per se, but when you're using a
|
||||
checkout you will need to get its dependencies in place.
|
||||
You don't need to "build" Leiningen per se, but when you're developing
|
||||
on a checkout you will need to get its dependencies in place. Just use
|
||||
a stable release of Leiningen to run `lein do install, classpath
|
||||
.lein-bootstrap` in the `leiningen-core` directory.
|
||||
|
||||
Use Leiningen 1.x to run `lein1 install` in the `leiningen-core`
|
||||
directory. If you don't have 1.x installed, simply check out the `1.x`
|
||||
branch and copy `bin/lein` to `lein1` somewhere on your `$PATH`, then
|
||||
switch your branch back. Alternately you can run `mvn
|
||||
dependency:copy-dependencies` in the same directory followed by `cp -r
|
||||
target/dependency lib`.
|
||||
If you don't have a stable `lein` installed, simply check out the
|
||||
`stable` branch and copy `bin/lein` to somewhere on your `$PATH`, then
|
||||
switch your branch back.
|
||||
|
||||
Once you've done that, symlink `bin/lein` to somewhere on your
|
||||
`$PATH`. Usually you'll want to rename your existing installation to
|
||||
keep them from interfering.
|
||||
If you want to use your development copy for everyday usage, symlink
|
||||
`bin/lein` to somewhere on your `$PATH`. You'll want to rename your
|
||||
stable installation to keep them from interfering; typically you can
|
||||
name that `lein2` or `lein-stable`.
|
||||
|
||||
When the dependencies change you may have to do `rm .lein-classpath`
|
||||
in the project root, though in most cases this can be done automatically.
|
||||
|
|
14
bin/lein
14
bin/lein
|
@ -97,10 +97,11 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
|
|||
# Running from source checkout
|
||||
LEIN_DIR="$(dirname "$BIN_DIR")"
|
||||
|
||||
# Need to use lein 1.x to bootstrap the leiningen-core library (for aether)
|
||||
if [ "$(ls "$LEIN_DIR"/leiningen-core/lib/*)" = "" ]; then
|
||||
# Need to use lein release to bootstrap the leiningen-core library (for aether)
|
||||
if [ ! -r "$LEIN_DIR/leiningen-core/.lein-bootstrap" ]; then
|
||||
echo "Leiningen is missing its dependencies."
|
||||
echo "Please see \"Bootstrapping\" in CONTRIBUTING.md."
|
||||
echo "Please run `lein do install, classpath .lein-bootstrap` in the leiningen-core/"
|
||||
echo "directory with a stable release of Leiningen. See CONTRIBUTING.md for details."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -113,8 +114,7 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Use bin/lein to calculate its own classpath since src/ and
|
||||
# leiningen-core/lib/*jar suffices to run the classpath task.
|
||||
# Use bin/lein to calculate its own classpath.
|
||||
if [ ! -r "$LEIN_DIR/.lein-classpath" ] && [ "$1" != "classpath" ]; then
|
||||
echo "Recalculating Leiningen's classpath."
|
||||
ORIG_PWD="$PWD"
|
||||
|
@ -129,12 +129,12 @@ if [ -r "$BIN_DIR/../src/leiningen/version.clj" ]; then
|
|||
mkdir -p "$LEIN_DIR/target/classes"
|
||||
export LEIN_JVM_OPTS="${LEIN_JVM_OPTS:-"-Xms64m -Xmx256m"} -Dclojure.compile.path=$LEIN_DIR/target/classes"
|
||||
add_path CLASSPATH "$LEIN_DIR/leiningen-core/src/" "$LEIN_DIR/leiningen-core/resources/" \
|
||||
"$LEIN_DIR/test:$LEIN_DIR/target/classes" "$LEIN_DIR/src" ":$LEIN_DIR/resources"
|
||||
"$LEIN_DIR/test:$LEIN_DIR/target/classes" "$LEIN_DIR/src" ":$LEIN_DIR/resources"
|
||||
|
||||
if [ -r "$LEIN_DIR/.lein-classpath" ]; then
|
||||
add_path CLASSPATH "$(cat "$LEIN_DIR/.lein-classpath" 2> /dev/null)"
|
||||
else
|
||||
add_path CLASSPATH "$LEIN_DIR/leiningen-core/lib/*"
|
||||
add_path CLASSPATH "$(cat "$LEIN_DIR/leiningen-core/.lein-bootstrap" 2> /dev/null)"
|
||||
fi
|
||||
else # Not running from a checkout
|
||||
add_path CLASSPATH "$LEIN_JAR"
|
||||
|
|
Loading…
Reference in a new issue