aboutsummaryrefslogblamecommitdiffstats
path: root/alsa-utils/Makefile
blob: 2a86985cd29effe109a1f71ced7a1b7d7a009988 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                
                                                                                                       











                                                                           
.POSIX:

XINITRC_ORDER = 90

install:
	../check-installed-shebang speakers
	../check-installed-shebang headphones
	mkdir -p -- ~/.local/bin
	test ! -e ~/.local/bin/speakers || test -L ~/.local/bin/speakers
	ln -sf -- ~/.dotfiles/alsa-utils/speakers ~/.local/bin/speakers
	test ! -e ~/.local/bin/headphones || test -L ~/.local/bin/headphones
	ln -sf -- ~/.dotfiles/alsa-utils/headphones ~/.local/bin/headphones
	mkdir -p -- ~/.config/X11/xinit/xinitrc.d
	test ! -e ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util || \
		test -L ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util
	ln -sf -- ~/.dotfiles/alsa-utils/xinit ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util

uninstall:
	+! ../check-installed alsa-utils
	-unlink -- ~/.local/bin/speakers
	-unlink -- ~/.local/bin/headphones
	-unlink -- ~/.config/X11/xinit/xinitrc.d/$(XINITRC_ORDER)-alsa-util
	-rmdir -- ~/.config/X11/xinit/xinitrc.d
	-rmdir -- ~/.config/X11/xinit
	-rmdir -- ~/.config/X11

clean:
	@: