X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=Makefile;h=e576ff79dc25e1b362d5b433b0527124727a09f9;hb=bd853e37f853710d1d4dde28484b0dffdd201630;hp=71b1ea41e1de23973fb7b517d168b75ccc0643b2;hpb=7acf9b505b5d9b3e2656aa4ffca938075ff7b79d;p=khome.git diff --git a/Makefile b/Makefile index 71b1ea4..e576ff7 100644 --- a/Makefile +++ b/Makefile @@ -1,17 +1,27 @@ MAKEFLAGS := --no-builtin-rules -DIFF := diff --color=always DEPS := $(wildcard deps/*) +ifeq ($(shell uname),Darwin) + SED := gsed + DIFF := $(shell gls -t1 /usr/local/Cellar/diffutils/*/bin/diff | head -1) +else + SED := sed + DIFF := diff +endif + .PHONY: \ default \ clean \ $(DEPS) \ deps \ home \ + diff \ + pull \ mpdconf \ pkgs_brew_cask_install \ pkgs_brew_install \ + pkgs_cargo \ pkgs_deb_install \ pkgs_deb_purge \ pkgs_debian \ @@ -75,6 +85,13 @@ pkgs_ubuntu_debfiles: list pkgs-ubuntu-debfiles.list pkgs_pip: sudo pip3 install $(shell ./list pkgs-pip.list) +# +# Rust (cargo) +# + +pkgs_cargo: list pkgs-cargo.list + cargo install $(shell ./list pkgs-cargo.list) + # # Homebrew/Mac # @@ -127,24 +144,14 @@ endef $(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d)))) diff: - $(DIFF) $(HOME)/.Rprofile home/.Rprofile || true - $(DIFF) $(HOME)/.compton.conf home/.compton.conf || true - $(DIFF) $(HOME)/.config/dunst/dunstrc home/.config/dunst/dunstrc || true - $(DIFF) $(HOME)/.config/mimeapps.list home/.config/mimeapps.list || true - $(DIFF) $(HOME)/.config/neofetch/config.conf home/.config/neofetch/config.conf || true - $(DIFF) $(HOME)/.config/ranger/rc.conf home/.config/ranger/rc.conf || true - $(DIFF) $(HOME)/.config/screengrab/screengrab.conf home/.config/screengrab/screengrab.conf || true - $(DIFF) $(HOME)/.fonts.conf home/.fonts.conf || true - $(DIFF) $(HOME)/.mpdconf home/.mpdconf || true - $(DIFF) $(HOME)/.newsboat/config home/.newsboat/config || true - $(DIFF) $(HOME)/.profile home/.profile || true - $(DIFF) $(HOME)/.tmux.conf home/.tmux.conf || true - $(DIFF) $(HOME)/.xbindkeysrc home/.xbindkeysrc || true - $(DIFF) $(HOME)/lib/login_aliases.sh home/lib/login_aliases.sh || true - $(DIFF) $(HOME)/lib/login_functions.sh home/lib/login_functions.sh || true - $(DIFF) $(HOME)/lib/login_variables.sh home/lib/login_variables.sh || true - $(DIFF) $(HOME)/lib/login_variables_dpi_high.sh home/lib/login_variables_dpi_high.sh || true - $(DIFF) $(HOME)/lib/login_variables_dpi_norm.sh home/lib/login_variables_dpi_norm.sh || true + find home -type f -print0 \ + | $(SED) -z 's/^home\///g' \ + | xargs -0 -I% sh -c 'echo %; $(DIFF) --color=always ~/% home/%' + +pull: + find home -type f -print0 \ + | $(SED) -z 's/^home\///g' \ + | xargs -0 -I% sh -c '$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%' clean: rm -rf ./debfiles