1 MAKEFLAGS
:= --no-builtin-rules
3 DEPS
:= $(wildcard deps
/*)
5 ifeq ($(shell uname
),Darwin
)
8 DIFF
:= $(shell gls
-t1
/usr
/local
/Cellar
/diffutils
/*/bin
/diff | head
-1)
26 pkgs_brew_cask_install \
39 @echo
'================================================================================'
40 @echo
'| Default target disabled. Specify a concrete one.'
41 @echo
'================================================================================'
44 home
: mpdconf compiled
46 # Limit depth because directories are copied recursively:
47 find home
-maxdepth
1 -print0 \
48 |
$(GREP
) -zv
'^home$$' \
49 | xargs
-0 -I
% cp
-Rp
% ~
54 mkdir
-p ~
/var
/lib
/mpd
/playlists
55 mkdir
-p ~
/var
/log
/mpd
56 mkdir
-p ~
/var
/run
/mpd
57 cp home
/.mpdconf
$(HOME
)/
72 sudo xbps-install
$(shell .
/list pkgs-void.list
)
75 xbps-query
-m | awk
-F
- '{sub("-" $$NF "$$", ""); print}' |
sort -u
> pkgs-void.list
76 (echo
'#'; .
/patch-comments pkgs-void.list.comments pkgs-void.list
) | sponge pkgs-void.list
81 pkgs_golang
: list pkgs-golang.list
82 go
get -u
$(shell .
/list pkgs-golang.list
)
87 pkgs_ubuntu
: list pkgs-ubuntu.list
88 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
90 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
91 .
/install-debfiles pkgs-ubuntu-debfiles.list
97 pip
install --user
$(shell .
/list pkgs-pip.list
)
100 pip
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
106 pkgs_cargo
: list pkgs-cargo.list
107 cargo
install $(shell .
/list pkgs-cargo.list
)
114 $(MAKE
) pkgs_brew_install
115 $(MAKE
) pkgs_brew_cask_install
117 # TODO: Test pkgs_brew_tap when list contains multiple items
118 pkgs_brew_tap
: list pkgs-brew-tap.list
119 brew tap
$(shell .
/list pkgs-brew-tap.list
)
121 pkgs_brew_install
: list pkgs-brew-install.list
122 brew
install $(shell .
/list pkgs-brew-install.list
)
124 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
125 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
130 pkgs_deb_install
: list pkgs-deb-install.list
131 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
133 pkgs_deb_purge
: list pkgs-deb-purge.list
134 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
139 pkgs_snap_classic
: list pkgs-snap-classic.list
140 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
142 pkgs_snap_strict
: list pkgs-snap-strict.list
143 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
145 # 'snap' command comes from 'snapd' deb pkg
147 sudo snap
install --classic
$*
158 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
161 find home
-type f
-print0 \
162 |
$(SED
) -z
's/^home\///g' \
163 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=auto ~/% home/%'
166 find home
-type f
-print0 \
167 |
$(SED
) -z
's/^home\///g' \
168 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'