From ce644684ddf73bf924f008c705aee16cf021ccb1 Mon Sep 17 00:00:00 2001 From: Peter Son Struschka Date: Mon, 1 Mar 2021 11:45:04 +0800 Subject: paru: use paru instead of yay --- Makefile | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) (limited to 'Makefile') 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,$*) -- cgit v1.2.3