1 MAKEFLAGS
:= --no-builtin-rules
4 DEPS
:= $(wildcard deps
/*)
6 ifeq ($(shell uname
),Darwin
)
9 DIFF
:= $(shell gls
-t1
/usr
/local
/Cellar
/diffutils
/*/bin
/diff | head
-1)
28 pkgs_brew_cask_install \
41 @echo
'================================================================================'
42 @echo
'| Default target disabled. Specify a concrete one.'
43 @echo
'================================================================================'
59 mkdir
-p ~
/arc
/sw
/src
/misc
60 mkdir
-p ~
/arc
/sw
/src
/pkgs
61 mkdir
-p ~
/arc
/sw
/src
/repos
62 mkdir
-p ~
/arc
/sw
/src
/tarballs
76 mkdir
-p ~
/var
/lib
/mpd
/playlists
77 mkdir
-p ~
/var
/log
/mpd
78 mkdir
-p ~
/var
/run
/mpd
95 sudo xbps-install
$(shell .
/list pkgs-void.list
)
98 xbps-query
-m | awk
-F
- '{sub("-" $$NF "$$", ""); print}' |
sort -u | grep
-vf
<(.
/list
-v sep
='\n' -v end
='\n' pkgs-void-src.list
) > pkgs-void.list
99 (echo
'#'; .
/patch-comments pkgs-void.list.comments pkgs-void.list
) | sponge pkgs-void.list
104 pkgs_golang
: list pkgs-golang.list
105 go
get -u
$(shell .
/list pkgs-golang.list
)
110 pkgs_ubuntu
: list pkgs-ubuntu.list
111 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
113 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
114 .
/install-debfiles pkgs-ubuntu-debfiles.list
120 pip
install --user
$(shell .
/list pkgs-pip.list
)
123 pip
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
129 pkgs_cargo
: list pkgs-cargo.list
130 cargo
install $(shell .
/list pkgs-cargo.list
)
137 $(MAKE
) pkgs_brew_install
138 $(MAKE
) pkgs_brew_cask_install
140 # TODO: Test pkgs_brew_tap when list contains multiple items
141 pkgs_brew_tap
: list pkgs-brew-tap.list
142 brew tap
$(shell .
/list pkgs-brew-tap.list
)
144 pkgs_brew_install
: list pkgs-brew-install.list
145 brew
install $(shell .
/list pkgs-brew-install.list
)
147 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
148 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
153 pkgs_deb_install
: list pkgs-deb-install.list
154 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
156 pkgs_deb_purge
: list pkgs-deb-purge.list
157 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
162 pkgs_snap_classic
: list pkgs-snap-classic.list
163 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
165 pkgs_snap_strict
: list pkgs-snap-strict.list
166 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
168 # 'snap' command comes from 'snapd' deb pkg
170 sudo snap
install --classic
$*
181 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
184 find home
-type f
-print0 \
185 |
$(SED
) -z
's/^home\///g' \
187 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=auto ~/% home/%'
190 find home
-type f
-print0 \
191 |
$(SED
) -z
's/^home\///g' \
192 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'
195 # TODO Backup files before replacing.
196 # But - recursive copy is not a good strategy for this.
197 # Need to do a file by file pass, like the diff recipe.
199 # Limit depth because directories are copied recursively:
200 find home
-maxdepth
1 -print0 \
201 |
$(GREP
) -zv
'^home$$' \
202 | xargs
-0 -I
% cp
-Rp
% ~