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



                                

                                                          


                                                                            




                                                                                            

          
                                    



                                              

                                                  
.POSIX:

install:
	mkdir -p -- ~/.var/cache
	test ! -d ~/.python_history
	ln -sf .var/cache/python_history ~/.python_history
	mkdir -p -- ~/.config/profile.d
	test ! -d ~/.config/profile.d/python
	ln -sf -- ~/.dotfiles/python/user-profile ~/.config/profile.d/python
	if test "$$(python --version 2>&1 | cut -d ' ' -f 2 | cut -d . -f 1)" = 2; then \
		mkdir -p -- ~/.config/bash/aliases.d && \
		test ! -d ~/.config/bash/aliases.d/python && \
		ln -sf -- ~/.dotfiles/python/bash-aliases ~/.config/bash/aliases.d/python; \
	fi

uninstall:
	+! ../check-installed python
	-unlink -- ~/.config/profile.d/python
	-rmdir -- ~/.config/profile.d
	-unlink -- ~/.var/cache/python_history
	-unlink -- ~/.python_history
	-unlink -- ~/.config/bash/aliases.d/python
	-rmdir -- ~/.config/bash/aliases.d