Skip to content

Instantly share code, notes, and snippets.

@lululau
Created December 25, 2014 14:52
Show Gist options
  • Select an option

  • Save lululau/10062f3aa3b79664d11e to your computer and use it in GitHub Desktop.

Select an option

Save lululau/10062f3aa3b79664d11e to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ 0 = $# ]
then
lein repl
else
lein_home=$(brew info leiningen | sed -n 3p | cut -d' ' -f1)
clojure_jar_file_name=$(ls ${lein_home}/libexec)
clojure_jar_file_path="$lein_home/libexec/$clojure_jar_file_name"
java -cp "$clojure_jar_file_path" clojure.main "$@"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment