+
+(defn download-binary
+ [url destination]
+ (io/copy (:body @(http/get url)) (io/file destination)))
+
+(defn unixify
+ "Make a function `f` behave like a UNIX shell command."
+ [f]
+ (when (= *file* (System/getProperty "babashka.file"))
+ (let [content (if (> (.available System/in) 0)
+ (slurp *in*)
+ (first *command-line-args*))]
+ (doseq [arg (filter #(not= "" %) (split-lines content))]
+ (f arg)))))