From aff6d83d6626e9be675595c19852808d052ae5a4 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Mon, 11 Apr 2022 21:00:19 +0200 Subject: fix(bootstrap): add install fn --- fnl/bootstrap.fnl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'fnl') 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) -- cgit v1.2.3-70-g09d2