X-Git-Url: https://git.xandkar.net/?p=khome.git;a=blobdiff_plain;f=Makefile;h=02522ba5f37d149633b43e4854925913336dae51;hp=b67b8ce371b33b01c9b583e4a619b5228ff4cdc7;hb=cca3111ee83093100193ccfacfc102f6c407066f;hpb=cfe722ba154c1920038ed987024ddcbe6068be7b diff --git a/Makefile b/Makefile index b67b8ce..02522ba 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,8 @@ MAKEFLAGS := --no-builtin-rules DEPS := $(wildcard deps/*) .PHONY: \ - default \ + default \ + clean \ $(DEPS) \ deps \ home \ @@ -24,7 +25,8 @@ default: @echo '================================================================================' @exit 1 -home: mpdconf +home: mpdconf compiled + @cp -Rp bin $(HOME)/ @cp -Rp home/bin $(HOME)/ @cp -Rp home/lib $(HOME)/ @cp home/.compton.conf $(HOME)/ @@ -32,7 +34,6 @@ home: mpdconf @cp -Rp home/.newsboat/ $(HOME)/ @cp home/.profile $(HOME)/ @cp home/.fonts.conf $(HOME)/ - @fc-cache -fv @cp home/.Rprofile $(HOME)/ @cp home/.tmux.conf $(HOME)/ @cp home/.xbindkeysrc $(HOME)/ @@ -44,19 +45,43 @@ mpdconf: @mkdir -p ~/var/run/mpd @cp home/.mpdconf $(HOME)/ +compiled: + mkdir -p bin + cd src && make + mv src/clockloop bin/ + +font_cache: + @fc-cache -fv + +# +# Golang +# pkgs_golang: list pkgs-golang.list go get $(shell ./list pkgs-golang.list) +# +# Ubuntu +# pkgs_ubuntu: list pkgs-ubuntu.list sudo apt install $(shell ./list pkgs-ubuntu.list) -pkgs_mac: - $(MAKE) pkgs_brew_install - $(MAKE) pkgs_brew_cask_install +pkgs_ubuntu_debfiles: list pkgs-ubuntu-debfiles.list + ./install-debfiles pkgs-ubuntu-debfiles.list +# +# PIP +# pkgs_pip: sudo pip3 install $(shell ./list pkgs-pip.list) +# +# Homebrew/Mac +# + +pkgs_mac: + $(MAKE) pkgs_brew_install + $(MAKE) pkgs_brew_cask_install + # TODO: Test pkgs_brew_tap when list contains multiple items pkgs_brew_tap: list pkgs-brew-tap.list brew tap $(shell ./list pkgs-brew-tap.list) @@ -67,12 +92,18 @@ pkgs_brew_install: list pkgs-brew-install.list pkgs_brew_cask_install: list pkgs-brew-cask-install.list brew cask install $(shell ./list pkgs-brew-cask-install.list) +# +# Debian +# pkgs_deb_install: list pkgs-deb-install.list sudo apt install $(shell ./list pkgs-deb-install.list) pkgs_deb_purge: list pkgs-deb-purge.list sudo apt purge $(shell ./list pkgs-deb-purge.list) +# +# Snap +# pkgs_snap_classic: list pkgs-snap-classic.list @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p)) @@ -95,21 +126,10 @@ 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/%' + +clean: + rm -rf ./debfiles + cd src && make clean