This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-09-09
Channels
- # announcements (1)
- # beginners (166)
- # calva (2)
- # cider (7)
- # clojure (21)
- # clojure-dev (11)
- # clojure-italy (3)
- # clojure-russia (5)
- # clojure-spec (13)
- # clojure-uk (1)
- # clojurescript (251)
- # core-async (2)
- # cursive (14)
- # emacs (6)
- # events (8)
- # figwheel-main (5)
- # fulcro (17)
- # off-topic (8)
- # pedestal (3)
- # tools-deps (17)
@borkdude https://github.com/juxt/edge/blob/master/bin/uberjar this does aot w/ pack
I figured it out!
#!/usr/bin/env bash
":"; DEPS=\
'{:deps
{org.apache.commons/commons-compress {:mvn/version "1.17"}}}'
":"; exec clojure -Sdeps "$DEPS" "$0"
Neat. I’ve had a need for something like this this morning.
Have been meaning to ask why clojure doesn’t barf on the #!/usr/bin/env bash
?
(read-string "#!/usr/bin/env bash")
blows up… but clojure seems to somehow let it through…
#!
is indistinguishable from ;
AFAIK
your read-string
call fails with ;
as well, because there's nothing for it to return -- add a second line with a valid form and both will work
Yeah scroll down #tools-deps 🙂
oh sorry
not at all; thanks for answering 🙂
☝️ that seems sufficient to let you keep your deps in the clojure-syntax part of the file
also an advantage of not putting clojure
in the shebang is that you don't have to give the fully qualified path to it
pro-tip: if you ever have to use a lib that contains a '
in its version string (which would threaten the bash quotation), use \u0027
instead
probably
{:mvn/version "12.43.01'-sure"}
I mean I haven't tried itI put a fuller example here https://gist.github.com/gfredericks/900183dae706aae6361110b2383c8639
Weird and wonderful