implement makeSshWrapper()

This commit is contained in:
belliash 2012-01-09 11:42:56 +01:00
parent 1c0f2e1bbd
commit b85e61f3a5
1 changed files with 13 additions and 0 deletions

View File

@ -57,3 +57,16 @@ function checkoutSubversion() {
fi
return 0
}
#-------------------------------------------------------------------------------
# Creates SSH Wrapper for use with unknown hosts (requires key authentication)
#-------------------------------------------------------------------------------
function makeSshWrapper() {
echo "#!/bin/bash" > ${BINDIR}/ssh_wrapper.sh
echo "exec ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no \
\"\$@\"" >> ${BINDIR}/ssh_wrapper.sh
chmod +x ${BINDIR}/ssh_wrapper.sh || return 1
export GIT_SSH="${BINDIR}/ssh_wrapper.sh"
export SVN_SSH="${BINDIR}/ssh_wrapper.sh"
return 0
}