Boilerplate for running Clojure as a shebang script
March 22, 2019 · View on GitHub
#!/bin/sh #_(
#_DEPS is same format as deps.edn. Multiline is okay. DEPS=' {:deps {clj-time {:mvn/version "0.14.2"}}} '
#_You can put other options here OPTS=' -J-Xms256m -J-Xmx256m -J-client '
exec clojure DEPS" "$0" "$@"
)
(println "Hello!")
(require '[clj-time.core :as t])
(prn (str (t/now)))
(prn command-line-args)
(println (.. (Runtime/getRuntime) totalMemory))