(import '[java.nio.file Files FileSystems CopyOption StandardCopyOption])
+(require '[babashka.process :as p] '[org.httpkit.client :as http])
+
+(defn run-cmd
+ [command]
+ (->> command
+ p/process
+ :out
+ slurp))
+
(defn extract-file-from-zip
[zip-file-name source destination]
(let [zip-file (io/file zip-file-name)
(if (.startsWith s "~")
(clojure.string/replace-first s "~" (System/getProperty "user.home"))
s))
+
+(defn download-binary
+ [url destination]
+ (io/copy (:body @(http/get url)) (io/file destination)))