aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2021-03-01 11:45:04 +0800
committerPeter Son Struschka <me@peter-struschka.com>2021-03-01 11:45:04 +0800
commitce644684ddf73bf924f008c705aee16cf021ccb1 (patch)
tree9146fc360578fedde8bfbeae39fecf43cc1acc09 /Makefile
parent83d7b9c7ce20f16681afacf99ed3ab47427f1ded (diff)
downloaddotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.tar.gz
dotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.tar.bz2
dotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.tar.lz
dotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.tar.xz
dotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.tar.zst
dotfiles-ce644684ddf73bf924f008c705aee16cf021ccb1.zip
paru: use paru instead of yay
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 24 insertions, 13 deletions
diff --git a/Makefile b/Makefile
index f551182..cb750ae 100644
--- a/Makefile
+++ b/Makefile
@@ -9,33 +9,44 @@ all_files := $(special_files) $(simple_files) $(pkg_dependent_files)
MAKEFILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
BASE_DIR := $(patsubst %/,%,$(dir $(MAKEFILE_PATH)))
+stow_dir = stow -t ~ $(1)
+unstow = stow -Dt ~ $(1)
+
+aur_install = pacman -Q $(1) || (git clone aur:$(1) && pushd $(1) && makepkg -si && popd)
+pkg_install = pacman -Q $(1) || sudo pacman -S $(1)
+check_install_deps = pacman -Q - < meta/$(1)_deps || paru -S --needed - < meta/$(1)_deps
+
$(simple_files):
- stow -t ~ $@
+ $(call stow_dir,$@)
-$(pkg_dependent_files): yay
- yay -Q - < meta/$@_deps || yay -S --needed - < meta/$@_deps
- stow -t ~ $@
+$(pkg_dependent_files): paru
+ $(call check_install_deps,$@)
+ $(call stow_dir,$@)
# special install rules
git:
- pacman -Q git || sudo pacman -S git
- stow -t ~ $@
+ $(call pkg_install,$@)
+ $(call stow_dir,$@)
yay: git
- pacman -Q yay || (git clone aur:yay && pushd yay && makepkg -si && popd)
+ $(call aur_install,$@)
+
+paru: git
+ $(call aur_install,$@)
+ $(call stow_dir,$@)
tmux: yay
- pacman -Q - < meta/powerline_deps || yay -S --needed - < meta/powerline_deps
- stow -t ~ $@
+ $(call check_install_deps,powerline)
+ $(call stow_dir,$@)
nvim:
curl -fLo nvim/.config/nvim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
- stow -t ~ $@
+ $(call stow_dir,$@)
zsh: basics antibody
- stow -t ~ $@
+ $(call stow_dir,$@)
antibody: $(BASE_DIR)/zsh/.config/zsh/zsh_plugins.txt
curl -sfL git.io/antibody | sh -s - -b $(BASE_DIR)/zsh/.local/bin
@@ -43,7 +54,7 @@ antibody: $(BASE_DIR)/zsh/.config/zsh/zsh_plugins.txt
$(addprefix uninstall_,$(all_files)):
- stow -Dt ~ $(subst uninstall_,,$@)
+ $(call unstow,$(subst uninstall_,,$@))
uninstall_%:
- stow -Dt ~ $*
+ $(call unstow,$*)