diff --git a/install.sh b/install.sh deleted file mode 100755 index be37818..0000000 --- a/install.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -rm -f $HOME/.ssh/authorized_keys - -mkdir -p $HOME/.ssh - -ln -s $(pwd)/ssh/authorized_keys $HOME/.ssh/authorized_keys - diff --git a/ssh/Makefile b/ssh/Makefile new file mode 100644 index 0000000..8523293 --- /dev/null +++ b/ssh/Makefile @@ -0,0 +1,17 @@ +AUTHORIZED_KEYS=authorized_keys +SSH_FOLDER=$(HOME)/.ssh +SSH_FOLDER_MOD=0700 + +.PHONY: clean_install + +clean_install: clean install + +$(SSH_FOLDER): + mkdir -p $(SSH_FOLDER) + chown $(SSH_FOLDER_MOD) $(SSH_FOLDER) + +install: $(SSH_FOLDER) + cp $(AUTHORIZED_KEYS) $(SSH_FOLDER) + +clean: + rm $(SSH_FOLDER)/$(AUTHORIZED_KEYS) \ No newline at end of file