summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustaf Rydholm <gustaf.rydholm@gmail.com>2022-04-11 21:00:19 +0200
committerGustaf Rydholm <gustaf.rydholm@gmail.com>2022-04-11 21:00:19 +0200
commitaff6d83d6626e9be675595c19852808d052ae5a4 (patch)
tree53497d605a2f1a3fa8af7cf978f3ac5872f1b923
parentaa75a843d4a84b3fd23db161914220dd403b8d5b (diff)
fix(bootstrap): add install fn
-rw-r--r--fnl/bootstrap.fnl15
1 files changed, 8 insertions, 7 deletions
diff --git a/fnl/bootstrap.fnl b/fnl/bootstrap.fnl
index af16502..2496c13 100644
--- a/fnl/bootstrap.fnl
+++ b/fnl/bootstrap.fnl
@@ -12,13 +12,14 @@
(defn- ensure-path [packer-path repository]
(fmt "%s/packer/start/%s" packer-path repository))
-(defn- ensure [user repository]
- (let [path (ensure-path packer-path repository)]
- (if (> (vim.fn.empty (vim.fn.glob path) 0))
- (do
- (execute (fmt git-clone-url user repository path))
- (execute (fmt "packadd %s" repository))
- true))))
+(defn- install [user repository path]
+ (execute (fmt git-clone-url user repository path))
+ (execute (fmt "packadd %s" repository)))
+
+(defn- ensure [user repository] (let [path (ensure-path packer-path repository)]
+ (if (> (vim.fn.empty (vim.fn.glob path) 0))
+ (install user repository path)
+ true)))
(defn run [] (let [is_bootstrapped (ensure :wbthomason :packer.nvim)]
(ensure :Olical :aniseed)