1 MAKEFLAGS
:= --no-builtin-rules
3 DEPS
:= $(wildcard deps
/*)
5 ifeq ($(shell uname
),Darwin
)
7 DIFF
:= $(shell gls
-t1
/usr
/local
/Cellar
/diffutils
/*/bin
/diff | head
-1)
22 pkgs_brew_cask_install \
34 @echo
'================================================================================'
35 @echo
'| Default target disabled. Specify a concrete one.'
36 @echo
'================================================================================'
39 home
: mpdconf compiled
41 @cp
-Rp home
/bin
$(HOME
)/
42 @cp
-Rp home
/lib
$(HOME
)/
43 @cp home
/.compton.conf
$(HOME
)/
44 @cp
-Rp home
/.config
/ $(HOME
)/
45 @cp
-Rp home
/.newsboat
/ $(HOME
)/
46 @cp home
/.profile
$(HOME
)/
47 @cp home
/.fonts.conf
$(HOME
)/
48 @cp home
/.Rprofile
$(HOME
)/
49 @cp home
/.tmux.conf
$(HOME
)/
50 @cp home
/.xbindkeysrc
$(HOME
)/
53 @mkdir
-p ~
/Archives
/Audio
54 @mkdir
-p ~
/var
/lib
/mpd
/playlists
55 @mkdir
-p ~
/var
/log
/mpd
56 @mkdir
-p ~
/var
/run
/mpd
57 @cp home
/.mpdconf
$(HOME
)/
70 pkgs_golang
: list pkgs-golang.list
71 go
get $(shell .
/list pkgs-golang.list
)
76 pkgs_ubuntu
: list pkgs-ubuntu.list
77 sudo apt
install $(shell .
/list pkgs-ubuntu.list
)
79 pkgs_ubuntu_debfiles
: list pkgs-ubuntu-debfiles.list
80 .
/install-debfiles pkgs-ubuntu-debfiles.list
86 sudo pip3
install $(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/%'