From b30948a880231ee4fec3ff65522437d0bcfa4eb5 Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 17 Jan 2012 11:49:40 +0100 Subject: [PATCH] make a use of our wrapper --- ezsync | 2 +- libraries/repositories | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ezsync b/ezsync index 8eb0a51..85ac07c 100755 --- a/ezsync +++ b/ezsync @@ -88,7 +88,7 @@ fi # Initialize EzBuild environment makeCoreDirectories || die "EzBuild was unable to create all necessary directories!" 1 EZNOTIFY="yes" -makeSshWrapper || die "EzBuild was unable to create a wrapper file to SSH" 1 +prepareSshWrappers || die "EzBuild was unable to create a wrapper files to SSH" 1 trap 'die "Process killed! This may lead into unexpected problems!"' 1 2 3 9 15 17 18 23 # Load necessary public keys diff --git a/libraries/repositories b/libraries/repositories index 40ac2c4..a70da2e 100644 --- a/libraries/repositories +++ b/libraries/repositories @@ -4,13 +4,11 @@ #------------------------------------------------------------------------------- -# Creates SSH Wrapper for use with unknown hosts (requires key authentication) +# Prepares SSH Wrappers 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 +function prepareSshWrappers() { + run "cp ${EZROOT}/files/ssh_wrapper.sh ${BINDIR}/ssh_wrapper.sh" || return 1 + run "chmod +x ${BINDIR}/ssh_wrapper.sh" || return 1 export GIT_SSH="${BINDIR}/ssh_wrapper.sh" export SVN_SSH="${BINDIR}/ssh_wrapper.sh" return 0