Last active
December 19, 2015 16:29
-
-
Save candera/5984212 to your computer and use it in GitHub Desktop.
Creates a simple Leiningen project in a throwaway directory, includes dependencies, and starts a REPL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Example usage: | |
# | |
# lein-play '[org.craigandera/dynne "0.2.0"] [incanter/incanter-core "1.5.1"]' | |
LIBS=$* | |
PROJECT_DIR=/tmp/lein-play-`date +%Y%m%d%H%M%S` | |
mkdir $PROJECT_DIR | |
cat > ${PROJECT_DIR}/project.clj <<EOF | |
(defproject playground "0.1.0-SNAPSHOT" | |
:description "FIXME: write description" | |
:url "http://example.com/FIXME" | |
:license {:name "Eclipse Public License" | |
:url "http://www.eclipse.org/legal/epl-v10.html"} | |
:dependencies [[org.clojure/clojure "1.5.1"] ${LIBS}]) | |
EOF | |
cd ${PROJECT_DIR} | |
lein repl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Huh. Under Cygwin, the resulting REPL won't accept standard input. Some bash weirdness. Need to look into this. Does it work under Linux?