Skip to content

Instantly share code, notes, and snippets.

@Artiavis
Created December 14, 2017 03:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Artiavis/491ab6529efb7a647012d8a68a581f70 to your computer and use it in GitHub Desktop.
Save Artiavis/491ab6529efb7a647012d8a68a581f70 to your computer and use it in GitHub Desktop.
A couple of handy shim functions for bootstrapping a Drip client with Clojure REPL's while bootstrapping though the new CLJ script.
#!/usr/bin/env sh
export DRIP_CLJ_CACHE_FILE="${HOME}/bin/.clj-class-path-cache"
dripclj_cache() {
clj -J-Xint -e '(-> "java.class.path" System/getProperty println)' > ${DRIP_CLJ_CACHE_FILE}
read -d $'\x04' DRIP_CLJ_CACHE < "${DRIP_CLJ_CACHE_FILE}"
}
dripclj() {
if [ -z "${DRIP_CLJ_CACHE_FILE}" ]; then
read -d $'\x04' DRIP_CLJ_CACHE < "${DRIP_CLJ_CACHE_FILE}"
fi
drip -Xms25m -Xmx100m -XX:+UseG1GC -cp "${DRIP_CLJ_CACHE}" clojure.main "$@"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment