- (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)))
+ (println "Updating...")
+ (download-latest version architecture tarball)
+ (run-cmd ["tar" "-xzf" tarball "--directory" destination])
+ (fs/set-posix-file-permissions (str destination "/bb") "rwxr-xr-x")
+ (io/delete-file tarball)
+ (println "Done!")))
+
+(when (= *file* (System/getProperty "babashka.file")) (update-babashka))