Skip to content

Instantly share code, notes, and snippets.

@glts
Last active July 23, 2022 23:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glts/59f3f2548ae3c33ce9738a497ff6b973 to your computer and use it in GitHub Desktop.
Save glts/59f3f2548ae3c33ce9738a497ff6b973 to your computer and use it in GitHub Desktop.
Shell script for running stand-alone Clojure scripts
#!/usr/bin/env bash
# Runner for stand-alone Clojure scripts.
set -o errexit
set -o nounset
: "${JAVA_CMD:=java}"
: "${CLOJURE_VERSION:=1.8.0}"
: "${CLOJURE_JAR:=${HOME}/.m2/repository/org/clojure/clojure/${CLOJURE_VERSION}/clojure-${CLOJURE_VERSION}.jar}"
exec "${JAVA_CMD}" -classpath "${CLOJURE_JAR}" clojure.main "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment