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