aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Linskey2026-05-30 00:17:05 -0400
committerBenjamin Linskey2026-05-30 00:17:05 -0400
commitdec0a812f918750b068728693fced3200080a6f9 (patch)
tree809b2ce0570a3772c814d8ca0bf488364ef67341
parentf048645980233affeca5a78f9e381141ef8e4508 (diff)
downloaddotfiles-dec0a812f918750b068728693fced3200080a6f9.tar.gz

Move Vim repos to project directory

-rw-r--r--.gitignore1
-rw-r--r--Makefile4
-rwxr-xr-xinstall.sh7
3 files changed, 7 insertions, 5 deletions
diff --git a/.gitignore b/.gitignore
index bd4fbd7..79178c8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
.vim/.netrwhist
.vim/pack
+vim-plugins
diff --git a/Makefile b/Makefile
index 1dc6527..b1834b7 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,10 @@
.POSIX:
+VIM_REPO_DIR := $(PWD)/vim-plugins
+
.PHONY: install
install:
- ./install.sh
+ VIM_REPO_DIR=$(VIM_REPO_DIR) ./install.sh
.PHONY: win
win:
diff --git a/install.sh b/install.sh
index d418543..e3a084d 100755
--- a/install.sh
+++ b/install.sh
@@ -1,15 +1,14 @@
#!/bin/sh
-readonly VIM_REPOS="$HOME/.vim-plugins"
readonly VIM_PLUGS="$HOME/.vim/pack/plugins/start"
-# Clones a Git repository into $VIM_REPOS if the repository does not already
+# Clones a Git repository into $VIM_REPO_DIR if the repository does not already
# exist there.
#
# $1: Repository URL
# $2 (optional): Branch
clone_plugin() {
- path="${VIM_REPOS}/$(basename "$1")"
+ path="${VIM_REPO_DIR}/$(basename "$1")"
if [ -d "$path" ]; then
return
@@ -42,7 +41,7 @@ if [ "$(uname)" = Linux ]; then
fi
if command -v vim >/dev/null; then
- mkdir -p "$VIM_REPOS" "$VIM_PLUGS"
+ mkdir -p "$VIM_REPO_DIR" "$VIM_PLUGS"
clone_plugin https://git.linskey.org/ale/
clone_plugin https://git.linskey.org/ctrlp.vim/
clone_plugin https://git.linskey.org/iceberg.vim/ btl/main