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)
27 pkgs_brew_cask_install \
40 @echo
'================================================================================'
41 @echo
'| Default target disabled. Specify a concrete one.'
42 @echo
'================================================================================'
45 home
: compiled | mpdconf_dirs
52 mkdir
-p ~
/var
/lib
/mpd
/playlists
53 mkdir
-p ~
/var
/log
/mpd
54 mkdir
-p ~
/var
/run
/mpd
69 sudo xbps-install
$(shell .
/list pkgs-void.list
)
72 xbps-query
-m | awk
-F
- '{sub("-" $$NF "$$", ""); print}' |
sort -u
> pkgs-void.list
73 (echo
'#'; .
/patch-comments pkgs-void.list.comments pkgs-void.list
) | sponge pkgs-void.list
78 pkgs_golang
: list pkgs-golang.list
79 go
get -u
$(shell .
/list pkgs-golang.list
)
84 pkgs_ubuntu
: list pkgs-ubuntu.list
85 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
87 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
88 .
/install-debfiles pkgs-ubuntu-debfiles.list
94 pip
install --user
$(shell .
/list pkgs-pip.list
)
97 pip
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
103 pkgs_cargo
: list pkgs-cargo.list
104 cargo
install $(shell .
/list pkgs-cargo.list
)
111 $(MAKE
) pkgs_brew_install
112 $(MAKE
) pkgs_brew_cask_install
114 # TODO: Test pkgs_brew_tap when list contains multiple items
115 pkgs_brew_tap
: list pkgs-brew-tap.list
116 brew tap
$(shell .
/list pkgs-brew-tap.list
)
118 pkgs_brew_install
: list pkgs-brew-install.list
119 brew
install $(shell .
/list pkgs-brew-install.list
)
121 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
122 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
127 pkgs_deb_install
: list pkgs-deb-install.list
128 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
130 pkgs_deb_purge
: list pkgs-deb-purge.list
131 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
136 pkgs_snap_classic
: list pkgs-snap-classic.list
137 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
139 pkgs_snap_strict
: list pkgs-snap-strict.list
140 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
142 # 'snap' command comes from 'snapd' deb pkg
144 sudo snap
install --classic
$*
155 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
158 find home
-type f
-print0 \
159 |
$(SED
) -z
's/^home\///g' \
160 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=auto ~/% home/%'
163 find home
-type f
-print0 \
164 |
$(SED
) -z
's/^home\///g' \
165 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'
168 # Limit depth because directories are copied recursively:
169 find home
-maxdepth
1 -print0 \
170 |
$(GREP
) -zv
'^home$$' \
171 | xargs
-0 -I
% cp
-Rp
% ~