Skip to content

Commit

Permalink
remove gen-class on leiningen.core and update lein shell script and p…
Browse files Browse the repository at this point in the history
…roject file to deal with it
  • Loading branch information
danlarkin committed Nov 22, 2009
1 parent fe75bcb commit 07f61f6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/lein
Expand Up @@ -31,7 +31,7 @@ done

BIN_DIR="$(dirname "$SCRIPT")"

if [ -r "$BIN_DIR/../classes/leiningen/core.class" ]; then
if [ -r "$BIN_DIR/../src/leiningen/core.clj" ]; then
# Running from source checkout
LEIN_DIR="$(dirname "$BIN_DIR")"
CLASSPATH="$LEIN_DIR/src:$LEIN_DIR/classes:$LEIN_DIR/lib:$LEIN_JAR:$CLASSPATH"
Expand Down Expand Up @@ -79,5 +79,5 @@ elif [ "$1" = "self-install" ]; then
elif [ -z "$1" ]; then
echo "Usage: `basename $0` taskname. Run `basename $0` help for a list of tasks."
else
exec java -client -cp "$CLASSPATH" leiningen.core $@
exec java -client -cp "$CLASSPATH" clojure.main -e "(use 'leiningen.core)(main \"$*\")"
fi
1 change: 0 additions & 1 deletion project.clj
Expand Up @@ -4,7 +4,6 @@

(defproject leiningen "1.0.0-SNAPSHOT"
:description "A build tool designed not to set your hair on fire."
:main leiningen.core
:dependencies [[org.clojure/clojure "1.1.0-alpha-SNAPSHOT"]
[org.clojure/clojure-contrib "1.0-SNAPSHOT"]
[ant/ant-launcher "1.6.2"]
Expand Down
8 changes: 4 additions & 4 deletions src/leiningen/core.clj
@@ -1,6 +1,5 @@
(ns leiningen.core
(:use [clojure.contrib.with-ns])
(:gen-class))
(:use [clojure.contrib.with-ns]))

(def project nil)

Expand Down Expand Up @@ -40,8 +39,9 @@
(catch java.io.FileNotFoundException e
(partial command-not-found command)))))

(defn -main [command & args]
(let [command (or (aliases command) command)
(defn main [args-string]
(let [[command & args] (.split args-string " ")
command (or (aliases command) command)
project (if (= command "new") ; only new works without a project.clj
(first args)
(read-project))]
Expand Down

0 comments on commit 07f61f6

Please sign in to comment.