module "ssh-agent": make sure SSH_ENV dir exists

This commit is contained in:
Alexander Gehrke (crater2150) 2016-01-05 03:53:52 +01:00
parent b61f1620d2
commit 8914edaacd

View file

@ -3,6 +3,8 @@
# file # file
SSH_ENV="$HOME/.ssh/environment" SSH_ENV="$HOME/.ssh/environment"
[ -e "${SSH_ENV:h}" ] || mkdir -p "${SSH_ENV:h}"
function start_agent { function start_agent {
echo "Initialising new SSH agent..." echo "Initialising new SSH agent..."
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}" /usr/bin/ssh-agent | sed 's/^echo/#echo/' > "${SSH_ENV}"