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)
24 pkgs_brew_cask_install \
37 @echo
'================================================================================'
38 @echo
'| Default target disabled. Specify a concrete one.'
39 @echo
'================================================================================'
42 home
: mpdconf compiled
44 # Limit depth because directories are copied recursively:
45 find home
-maxdepth
1 -print0 \
46 |
$(GREP
) -zv
'^home$$' \
47 | xargs
-0 -I
% cp
-Rp
% ~
51 mkdir
-p ~
/var
/lib
/mpd
/playlists
52 mkdir
-p ~
/var
/log
/mpd
53 mkdir
-p ~
/var
/run
/mpd
54 cp home
/.mpdconf
$(HOME
)/
67 pkgs_golang
: list pkgs-golang.list
68 go
get -u
$(shell .
/list pkgs-golang.list
)
73 pkgs_ubuntu
: list pkgs-ubuntu.list
74 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
76 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
77 .
/install-debfiles pkgs-ubuntu-debfiles.list
83 pip3
install --user
$(shell .
/list pkgs-pip.list
)
86 pip3
install --user
--upgrade
$(shell .
/list pkgs-pip.list
)
92 pkgs_cargo
: list pkgs-cargo.list
93 cargo
install $(shell .
/list pkgs-cargo.list
)
100 $(MAKE
) pkgs_brew_install
101 $(MAKE
) pkgs_brew_cask_install
103 # TODO: Test pkgs_brew_tap when list contains multiple items
104 pkgs_brew_tap
: list pkgs-brew-tap.list
105 brew tap
$(shell .
/list pkgs-brew-tap.list
)
107 pkgs_brew_install
: list pkgs-brew-install.list
108 brew
install $(shell .
/list pkgs-brew-install.list
)
110 pkgs_brew_cask_install
: list pkgs-brew-cask-install.list
111 brew cask
install $(shell .
/list pkgs-brew-cask-install.list
)
116 pkgs_deb_install
: list pkgs-deb-install.list
117 sudo apt
install $(shell .
/list pkgs-deb-install.list
)
119 pkgs_deb_purge
: list pkgs-deb-purge.list
120 sudo apt purge
$(shell .
/list pkgs-deb-purge.list
)
125 pkgs_snap_classic
: list pkgs-snap-classic.list
126 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-classic.list
),pkg_snap_classic_
$(p
))
128 pkgs_snap_strict
: list pkgs-snap-strict.list
129 @
$(MAKE
) $(foreach p
,$(shell .
/list pkgs-snap-strict.list
),pkg_snap_strict_
$(p
))
131 # 'snap' command comes from 'snapd' deb pkg
133 sudo snap
install --classic
$*
144 $(foreach d
,$(DEPS
),$(eval
$(call GEN_DEP_RULE
,$(d
))))
147 find home
-type f
-print0 \
148 |
$(SED
) -z
's/^home\///g' \
149 | xargs
-0 -I
% sh
-c
'echo %; $(DIFF) --color=always ~/% home/%'
152 find home
-type f
-print0 \
153 |
$(SED
) -z
's/^home\///g' \
154 | xargs
-0 -I
% sh
-c
'$(DIFF) -q ~/% home/% > /dev/null || cp ~/% home/%'