Permalink
Browse files

adding run.sh and spec directory

  • Loading branch information...
1 parent a02156a commit 03108b3ab4a51ad34591f054824dec2530c0275d @amitrathore committed Jan 8, 2009
Showing with 53 additions and 0 deletions.
  1. +4 −0 .gitignore
  2. +3 −0 .gitmodules
  3. +1 −0 lib/clojure/specjure
  4. +44 −0 run.sh
  5. +1 −0 spec/clojure_spec.clj
View
@@ -0,0 +1,4 @@
+*~
+*#*
+.classpath
+.project
View
@@ -0,0 +1,3 @@
+[submodule "lib/clojure/specjure"]
+ path = lib/clojure/specjure
+ url = git://github.com/larrytheliquid/specjure.git
Submodule specjure added at 7a4fa3
View
44 run.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# Please make sure to configure ~/.clojure.conf or /etc/clojure.conf
+# sample configuration can be found at clojure.conf.sample
+#
+# Note, running this script will:
+# - Run ~/.clojurerc on boot up (if exists)
+# - Add all .jar files within clj_ext (~/.clojure on default)
+# to the classpath
+#
+#
+
+if [ ! -f /etc/clojure.conf -a ! -f ~/.clojure.conf ]; then
+ echo "Error: No config not found at /etc/clojure.conf or ~/.clojure.conf."
+ echo " Please provide one before starting this script."
+ echo " A sample can be found in the emacs-clojure repository named "
+ echo " clojure.conf.sample"
+ exit
+fi
+
+
+# Whether to load the repl or script
+if [ -z "$1" ]; then
+ clj_class=clojure.lang.Repl
+else
+ clj_class=clojure.lang.Script
+fi
+
+CAPJURE_HOME="."
+capjure_jars="${CAPJURE_HOME}/lib/java/"
+capjure_clj="${CAPJURE_HOME}/lib/clojure/specjure/src/:${CAPJURE_HOME}/lib/clojure/conjure/src/"
+capjure_src="${CAPJURE_HOME}/src/"
+
+clj_cp="."
+[ -f /etc/clojure.conf ] && . /etc/clojure.conf
+[ -f ~/.clojure.conf ] && . ~/.clojure.conf
+[ -f ~/.clojurerc ] && clj_rc=~/.clojurerc
+[ -d "${clj_ext}" ] && clj_cp="${clj_cp}:${capjure_jars}/*:${capjure_src}:${capjure_clj}:${clj_ext}/*"
+
+if [ -n "${clj_lib}" ]; then
+ export LD_LIBRARY_PATH=${clj_lib}:$LD_LIBRARY_PATH
+fi
+
+exec java -Dpid=$$ ${clj_opts} -cp ${clj_cp}:${clj} ${clj_wrapper} ${clj_class} ${clj_rc} $*
View
@@ -0,0 +1 @@
+(ns spec.capjure (:use specjure))

0 comments on commit 03108b3

Please sign in to comment.