X-Git-Url: https://njoseph.me/gitweb/babashka-scripts.git/blobdiff_plain/f448b4b287309fd5cede4bfebe5327fe6d4c6b3e..0b0f2aa39a06e77b1517f895a2c82946f684b568:/lib.clj diff --git a/lib.clj b/lib.clj index e4616af..8978c3a 100644 --- a/lib.clj +++ b/lib.clj @@ -9,10 +9,12 @@ dest (io/file destination) fs (FileSystems/newFileSystem (.toPath zip-file) nil) file-in-zip (.getPath fs source (into-array String []))] - (Files/copy file-in-zip (.toPath dest) + (Files/copy file-in-zip + (.toPath dest) (into-array CopyOption [StandardCopyOption/REPLACE_EXISTING])))) -(defn expand-home [s] +(defn expand-home + [s] (if (.startsWith s "~") (clojure.string/replace-first s "~" (System/getProperty "user.home")) s))