utils: Add run-seq
[babashka-scripts.git] / install-deb.clj
CommitLineData
fbc08850
JN
1#! /usr/bin/env bb
2
3; Install a deb package from URL
4
76cc62f0
JN
5(require '[clojure.java.io :as io]
6 '[lib :refer [download-binary run-cmd unixify]])
fbc08850 7
76cc62f0
JN
8(defn- install-deb
9 [url]
10 (println "Downloading deb package..."
fbc08850
JN
11 (download-binary url "package.deb")
12 (println "Installing...")
13 (run-cmd ["sudo" "gdebi" "--non-interactive" "package.deb"])
14 (println "Cleaning up..")
15 (io/delete-file "package.deb")
16 (println "Done.")))
76cc62f0
JN
17
18(unixify install-deb)