Created
October 4, 2014 15:17
-
-
Save d9k/59f268ed42c8586c4672 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env lein-exec | |
;; REPL: run as `lein repl` then `(load-file "detect-repl.clj")` | |
;; CMD: run as `./detect-repl.clj` | |
;; | |
;; Where get lein-exec? | |
;; `wget https://raw.github.com/kumarshantanu/lein-exec/master/lein-exec` | |
;; see [clojure shellscripting tutorial](https://raw.github.com/kumarshantanu/lein-exec/master/lein-exec) | |
(println "1 + 2 =" (+ 1 2)) | |
(println (if (not-empty *command-line-args*) "I run from command line" "I run from REPL")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment