aboutsummaryrefslogblamecommitdiffstats
path: root/openssh/Makefile
blob: 6ee7512f071d64442c1dff7159228b9625f6f4aa (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
       
                    

        






                                                                           




                                                                                   





                                                             

                         
.POSIX:
include ../common.mk

install:
	if test -L ~/.ssh; then \
		test "$$(readlink -- ~/.ssh)" = ~/.dotfiles/.secrets/ssh; \
	else \
		test ! -e ~/.ssh && \
		ln -sf -- ~/.dotfiles/.secrets/ssh ~/.ssh; \
	fi
	mkdir -p -- ../.secrets/ssh
	mkdir -p -- ~/.config/bash/aliases.d
	test ! -d ~/.config/bash/aliases.d/openssh
	ln -sf -- ~/.dotfiles/openssh/bash-aliases ~/.config/bash/aliases.d/openssh

uninstall:
	-if ! $(CHECK_INSTALLED) ssh     2>/dev/null && \
	    ! $(CHECK_INSTALLED) openssh 2>/dev/null; then \
		unlink -- ~/.ssh; \
		unlink -- ~/.config/bash/aliases.d/openssh; \
		rmdir -- ~/.config/bash/aliases.d; \
	fi

.PHONY: install uninstall