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
% ~
53 mkdir
-p ~
/var
/lib
/mpd
/playlists
54 mkdir
-p ~
/var
/log
/mpd
55 mkdir
-p ~
/var
/run
/mpd
56 cp home
/.mpdconf
$(HOME
)/
71 sudo xbps-install
$(shell .
/list pkgs-void.list
)
74 xbps-query
-m | awk
-F
- '{sub("-" $$NF "$$", ""); print}' |
sort -u
> pkgs-void.list
75 patch pkgs-void.list pkgs-void.list.comments.patch
80 pkgs_golang
: list pkgs-golang.list
81 go
get -u
$(shell .
/list pkgs-golang.list
)
86 pkgs_ubuntu
: list pkgs-ubuntu.list
87 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
89 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
90 .
/install-debfiles pkgs-ubuntu-debfiles.list
96 pip
install --user
$(shell .
/list pkgs-pip.list
)
99 pip
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
105 pkgs_cargo
: list pkgs-cargo.list
106 cargo
install $(shell .
/list pkgs-cargo.list
)
113 $(MAKE
) pkgs_brew_install
114 $(MAKE
) pkgs_brew_cask_install
116 # TODO: Test pkgs_brew_tap when list contains multiple items
117 pkgs_brew_tap
: list pkgs-brew-tap.list
118 brew tap
$(shell .
/list pkgs-brew-tap.list
)
120 pkgs_brew_install
: list pkgs-brew-install.list
121 brew
install $(shell .
/list pkgs-brew-install.list
)
123 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
124 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
129 pkgs_deb_install
: list pkgs-deb-install.list
130 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
132 pkgs_deb_purge
: list pkgs-deb-purge.list
133 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
138 pkgs_snap_classic
: list pkgs-snap-classic.list
139 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
141 pkgs_snap_strict
: list pkgs-snap-strict.list
142 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
144 # 'snap' command comes from 'snapd' deb pkg
146 sudo snap
install --classic
$*
157 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
160 find home
-type f
-print0 \
161 |
$(SED
) -z
's/^home\///g' \
162 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=always ~/% home/%'
165 find home
-type f
-print0 \
166 |
$(SED
) -z
's/^home\///g' \
167 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'