Upload binary via scp

This commit is contained in:
alesapin 2021-04-14 19:25:48 +03:00
parent c506e3218b
commit e9e9a7d7d5
2 changed files with 6 additions and 1 deletions

View File

@ -19,12 +19,17 @@
[url]
(non-precise-cached-wget! url))
(defn get-clickhouse-scp
[path]
(c/upload path (str common-prefix "/clickhouse")))
(defn download-clickhouse
[source]
(info "Downloading clickhouse from" source)
(cond
(clojure.string/starts-with? source "rbtorrent:") (get-clickhouse-sky source)
(clojure.string/starts-with? source "http") (get-clickhouse-url source)
(.exists (io/file source)) (get-clickhouse-scp source)
:else (throw (Exception. (str "Don't know how to download clickhouse from" source)))))
(defn unpack-deb