babashka / bbin

Install any Babashka script or project with one command
MIT License
139 stars 9 forks source link

Does bbin support installing multiple libraries from `bb.edn`? #59

Open teodorlu opened 1 year ago

teodorlu commented 1 year ago

Since :bbin/bin is a map, I assumed installing multiple binaries was okay:

{:deps {io.github.teodorlu/shed {:local/root "."}}
 :bbin/bin {update-repos {:main-opts ["-m" "teodorlu.shed.update-repos/-main"]}
            browsetxt {:main-opts ["-m" "teodorlu.shed.browsetxt/-main"]}}}

(source)

But this seems to only install update-repos. Originally asked on Slack.


Should bbin be able to install multiple binaries, and not just one?

borkdude commented 1 year ago

I think this could be improved. PR welcome if @rads agrees.

teodorlu commented 1 year ago

The first key-value pair is picked in a (some-> bin-config first key str) here. Looks like the rest of the install-deps-git-or-local function assumes that script-name is one script and not multiple scripts.

https://github.com/teodorlu/bbin/blob/6b778266a490a4d0d89618a60bffc9617f62e7e3/src/babashka/bbin/scripts.clj#L413-L417

rads commented 1 year ago

Yep, the map is intentional to support multiple scripts, though I haven't gotten around to implementing that quite yet. See also: