From: Joseph Nuthalapati Date: Fri, 12 Feb 2021 08:38:18 +0000 (+0530) Subject: self-updater: Add missing when function X-Git-Url: https://njoseph.me/gitweb/babashka-scripts.git/commitdiff_plain/f448b4b287309fd5cede4bfebe5327fe6d4c6b3e self-updater: Add missing when function Signed-off-by: Joseph Nuthalapati --- diff --git a/update-babashka.clj b/update-babashka.clj index 41aa569..1681e4d 100755 --- a/update-babashka.clj +++ b/update-babashka.clj @@ -36,13 +36,13 @@ (println (str "Latest version is " version)) (download-binary url output))) -(= *file* (System/getProperty "babashka.file") - (let [architecture "linux-static-amd64" ;; TODO support multiple architectures - zip-file "babashka.zip" - destination (expand-home "~/bin/bb") - version (babashka-latest-version)] - (check-latest version) - (download-latest version architecture zip-file) - (extract-file-from-zip zip-file "bb" destination) - (fs/set-posix-file-permissions destination "rwxr-xr-x") - (io/delete-file zip-file))) +(when (= *file* (System/getProperty "babashka.file")) + (let [architecture "linux-static-amd64" ;; TODO support multiple architectures + zip-file "babashka.zip" + destination (expand-home "~/bin/bb") + version (babashka-latest-version)] + (check-latest version) + (download-latest version architecture zip-file) + (extract-file-from-zip zip-file "bb" destination) + (fs/set-posix-file-permissions destination "rwxr-xr-x") + (io/delete-file zip-file)))