This commit is contained in:
Michiel Borkent 2019-09-07 10:49:31 +02:00
parent 5ca10617d3
commit 876c2fe7a0
2 changed files with 18 additions and 2 deletions

View file

@ -229,7 +229,7 @@ bb '(load-file "script.clj")'
Using `bb` with a shebang also works:
``` clojure
#!/usr/bin/env bb -f
#!/usr/bin/env bb
(defn get-url [url]
(println "Fetching url:" url)
@ -260,6 +260,22 @@ Fetching url: https://www.clojure.org
Writing file: /tmp/clojure.org.html
```
If `/usr/bin/env` doesn't work for you, you can use the following workaround:
``` shellsession
$ cat script.clj
#!/bin/sh
#_(
"exec" "bb" "$0" hello "$@"
)
(prn *command-line-args*)
./script.clj 1 2 3
("hello" "1" "2" "3")
```
## Preloads
The environment variable `BABASHKA_PRELOADS` allows to define code that will be

View file

@ -1 +1 @@
0.0.17-SNAPSHOT
0.0.17