From f448b4b287309fd5cede4bfebe5327fe6d4c6b3e Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Fri, 12 Feb 2021 14:08:18 +0530 Subject: [PATCH] self-updater: Add missing when function Signed-off-by: Joseph Nuthalapati --- update-babashka.clj | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) 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))) -- 2.43.0