-
-
Save borkdude/dade8f32ffdfa82dd7d9f28cc2b33848 to your computer and use it in GitHub Desktop.
Self-contained clojure file with deps
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
*.clj linguist-language=Clojure | |
*.cljs linguist-language=Clojure |
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 bash | |
#! top-of-file comments can be written using more #! lines, which | |
#! is a valid comment in both clojure and bash | |
":";# alternately this works too | |
#! The construction below uses cross-language syntactic hackery to | |
#! specify the -Sdeps arg in a part of the file that's interpreted | |
#! by clojure as clojure syntax (i.e., not a line comment), so it | |
#! should get syntax highlighting and other editor support | |
":"; DEPS=\ | |
'{:deps | |
{org.apache.commons/commons-compress {:mvn/version "1.17"}}}' | |
":"; exec clojure -Sdeps "$DEPS" "$0" "$@" | |
(ns frobnicate | |
(:import | |
(org.apache.commons.compress.archivers ArchiveStreamFactory) | |
(org.apache.commons.compress.archivers.tar TarArchiveEntry))) | |
;; put useful code here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment