aboutsummaryrefslogblamecommitdiffstats
path: root/base/Makefile
blob: 365bde6bf1ed908e7e8f0b3a80dbe47248aa0b9b (plain) (tree)
1
2
3
4
5
6
7
8
9
       
                    






                                   
                                         





                                                            
                                                                        

                                                               
                                      
                                    











                                                                                              



                                                
                                                        
                                                                             




                                             


                                        
                                      
                                          
                                                                                

                         
.POSIX:
include ../common.mk

FACE = penguin.png

install:
	mkdir -p -- ~/.config
	test ! -d ~/.profile
	test ! -d ~/.config/profile
	test ! -d ~/.config/profile-North
	test ! -d ~/.config/user-dirs.locale
	test ! -d ~/.config/face
	test ! -d ~/.face
	test ! -d ~/.face.icon
	ln -sf -- .config/profile ~/.profile
	ln -sf -- ~/.dotfiles/base/profile ~/.config/profile
	ln -sf -- ~/.dotfiles/base/profile-North ~/.config/profile-North
	ln -sf -- ~/.dotfiles/base/user-dirs.locale ~/.config/
	ln -sf -- ~/.dotfiles/base/faces/$(FACE) ~/.config/face
	ln -sf -- .config/face ~/.face
	ln -sf -- .face ~/.face.icon
	if test -L ~/.config/locations; then \
		test "$$(readlink -- ~/.config/locations)" = ~/.dotfiles/.secrets/locations; \
	else \
		test ! -e ~/.config/locations && \
		ln -s -- ~/.dotfiles/.secrets/locations ~/.config/locations; \
	fi
	test ! -d ~/.config/geolocation
	test ! -d ~/.config/metar
	test -L ~/.config/locations/current || test ! -e ~/.config/locations/current
	test -L ~/.config/locations/current || ln -sf default ~/.config/locations/current
	ln -sf locations/current/geolocation ~/.config/geolocation
	ln -sf locations/current/metar ~/.config/metar
	mkdir -p -- ~/.local/bin
	test ! -d ~/.local/bin/iswork
	test -x /bin/false
	ln -sf -- /bin/false ~/.local/bin/iswork
	ln -sf ~/.dotfiles/base/new-c-proj ~/.local/bin/
	test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin install

uninstall:
	-unlink -- ~/.config/profile
	-unlink -- ~/.config/user-dirs.locale
	-unlink -- ~/.profile
	-unlink -- ~/.config/locations
	-unlink -- ~/.config/geolocation
	-unlink -- ~/.config/metar
	-unlink -- ~/.local/bin/iswork
	-unlink -- ~/.local/bin/new-c-proj
	-test ! -r ../.secrets/bin/Makefile || make -C ../.secrets/bin uninstall

.PHONY: install uninstall