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
'================================================================================'
52 mkdir
-p
$(shell .
/list dirs
)
67 sudo xbps-install
$(shell .
/list pkgs-void.list
)
70 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
71 (echo
'#'; .
/patch-comments pkgs-void.list.comments pkgs-void.list
) | sponge pkgs-void.list
76 pkgs_golang
: list pkgs-golang.list
77 go
get -u
$(shell .
/list pkgs-golang.list
)
82 pkgs_ubuntu
: list pkgs-ubuntu.list
83 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
85 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
86 .
/install-debfiles pkgs-ubuntu-debfiles.list
92 pip
install --user
$(shell .
/list pkgs-pip.list
)
95 pip
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
101 pkgs_cargo
: list pkgs-cargo.list
102 cargo
install $(shell .
/list pkgs-cargo.list
)
109 $(MAKE
) pkgs_brew_install
110 $(MAKE
) pkgs_brew_cask_install
112 # TODO: Test pkgs_brew_tap when list contains multiple items
113 pkgs_brew_tap
: list pkgs-brew-tap.list
114 brew tap
$(shell .
/list pkgs-brew-tap.list
)
116 pkgs_brew_install
: list pkgs-brew-install.list
117 brew
install $(shell .
/list pkgs-brew-install.list
)
119 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
120 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
125 pkgs_deb_install
: list pkgs-deb-install.list
126 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
128 pkgs_deb_purge
: list pkgs-deb-purge.list
129 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
134 pkgs_snap_classic
: list pkgs-snap-classic.list
135 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
137 pkgs_snap_strict
: list pkgs-snap-strict.list
138 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
140 # 'snap' command comes from 'snapd' deb pkg
142 sudo snap
install --classic
$*
153 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
156 find home
-type f
-print0 \
157 |
$(SED
) -z
's/^home\///g' \
159 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=auto ~/% home/%'
162 find home
-type f
-print0 \
163 |
$(SED
) -z
's/^home\///g' \
164 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'
167 # TODO Backup files before replacing.
168 # But - recursive copy is not a good strategy for this.
169 # Need to do a file by file pass, like the diff recipe.
171 # Limit depth because directories are copied recursively:
172 find home
-maxdepth
1 -print0 \
173 |
$(GREP
) -zv
'^home$$' \
174 | xargs
-0 -I
% cp
-Rp
% ~