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