1 MAKEFLAGS
:= --no-builtin-rules
3 DEPS
:= $(wildcard deps
/*)
5 ifeq ($(shell uname
),Darwin
)
7 DIFF
:= $(shell gls
-t1
/usr
/local
/Cellar
/diffutils
/*/bin
/diff | head
-1)
22 pkgs_brew_cask_install \
35 @echo
'================================================================================'
36 @echo
'| Default target disabled. Specify a concrete one.'
37 @echo
'================================================================================'
40 home
: mpdconf compiled
42 @cp
-Rp home
/bin
$(HOME
)/
43 @cp
-Rp home
/lib
$(HOME
)/
44 @cp home
/.compton.conf
$(HOME
)/
45 @cp
-Rp home
/.config
/ $(HOME
)/
46 @cp
-Rp home
/.newsboat
/ $(HOME
)/
47 @cp home
/.profile
$(HOME
)/
48 @cp home
/.fonts.conf
$(HOME
)/
49 @cp home
/.Rprofile
$(HOME
)/
50 @cp home
/.tmux.conf
$(HOME
)/
51 @cp home
/.xbindkeysrc
$(HOME
)/
54 @mkdir
-p ~
/Archives
/Audio
55 @mkdir
-p ~
/var
/lib
/mpd
/playlists
56 @mkdir
-p ~
/var
/log
/mpd
57 @mkdir
-p ~
/var
/run
/mpd
58 @cp home
/.mpdconf
$(HOME
)/
71 pkgs_golang
: list pkgs-golang.list
72 go
get $(shell .
/list pkgs-golang.list
)
77 pkgs_ubuntu
: list pkgs-ubuntu.list
78 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
80 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
81 .
/install-debfiles pkgs-ubuntu-debfiles.list
87 pip3
install --user
$(shell .
/list pkgs-pip.list
)
90 pip3
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
96 pkgs_cargo
: list pkgs-cargo.list
97 cargo
install $(shell .
/list pkgs-cargo.list
)
104 $(MAKE
) pkgs_brew_install
105 $(MAKE
) pkgs_brew_cask_install
107 # TODO: Test pkgs_brew_tap when list contains multiple items
108 pkgs_brew_tap
: list pkgs-brew-tap.list
109 brew tap
$(shell .
/list pkgs-brew-tap.list
)
111 pkgs_brew_install
: list pkgs-brew-install.list
112 brew
install $(shell .
/list pkgs-brew-install.list
)
114 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
115 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
120 pkgs_deb_install
: list pkgs-deb-install.list
121 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
123 pkgs_deb_purge
: list pkgs-deb-purge.list
124 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
129 pkgs_snap_classic
: list pkgs-snap-classic.list
130 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
132 pkgs_snap_strict
: list pkgs-snap-strict.list
133 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
135 # 'snap' command comes from 'snapd' deb pkg
137 sudo snap
install --classic
$*
148 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
151 find home
-type f
-print0 \
152 |
$(SED
) -z
's/^home\///g' \
153 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=always ~/% home/%'
156 find home
-type f
-print0 \
157 |
$(SED
) -z
's/^home\///g' \
158 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'