Skip to content
Browse files

move mkdir of classes/ from shell script into core.clj

  • Loading branch information...
1 parent cee9dcc commit 6fbdfb7a91a8eeafe485d8465917a0672b5005ac @danlarkin danlarkin committed Nov 22, 2009
Showing with 7 additions and 9 deletions.
  1. +0 −5 bin/lein
  2. +7 −4 src/leiningen/core.clj
View
5 bin/lein
@@ -6,11 +6,6 @@ LIBS="$(find -H lib/ -mindepth 2> /dev/null 1 -maxdepth 1 -print0 | tr \\0 \:)"
CLASSPATH="src/:classes/:$LIBS"
LEIN_JAR=$HOME/.m2/repository/leiningen/leiningen/$VERSION/leiningen-$VERSION.jar
-# this needs to exist before the JVM is launched apparently
-if [ -r project.clj ]; then
- mkdir -p classes
-fi
-
# normalize $0 on certain BSDs
if [ "$(dirname $0)" = "." ]; then
SCRIPT="$(which $(basename $0))"
View
11 src/leiningen/core.clj
@@ -1,5 +1,6 @@
(ns leiningen.core
- (:use [clojure.contrib.with-ns]))
+ (:use [clojure.contrib.with-ns])
+ (:import [java.io File]))
(def project nil)
@@ -46,9 +47,11 @@
command (or (aliases command) command)
project (if (no-project-needed command)
(first args)
- (read-project))]
- (binding [*compile-path* (or (:compile-path project)
- (str (:root project) "/classes/"))]
+ (read-project))
+ compile-path (or (:compile-path project)
+ (str (:root project) "/classes/"))]
+ (.mkdirs (File. compile-path))
+ (binding [*compile-path* compile-path]
(apply (resolve-command command) project args))
;; In case tests or some other task started any:
(shutdown-agents)))

0 comments on commit 6fbdfb7

Please sign in to comment.
Something went wrong with that request. Please try again.