Created
December 14, 2017 03:52
-
-
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.
This file contains 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 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