This commit is contained in:
Jephte CLAIN 2014-12-31 09:24:02 +04:00
parent e0bf8379ac
commit 65c260237b
2 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,9 @@
#!/bin/bash
# -*- coding: utf-8 mode: sh -*- vim:sw=4:sts=4:et:ai:si:sta:fenc=utf-8
# wrapper permettant d'utiliser GIT_SSH avec des outils comme git-annex
# La variable __UTOOLS_FORCE_PATH doit être définie: c'est la valeur de
# PATH à utiliser
# La variable __UTOOLS_FORCE_PATH doit être définie: c'est la valeur de PATH à
# utiliser. La variable __UTOOLS_FORCE_SSH peut être définie: c'est le nom de
# l'exécutable à utiliser pour lancer ssh.
[ -n "$__UTOOLS_FORCE_PATH" ] && export PATH="$__UTOOLS_FORCE_PATH"
exec "${GIT_SSH:-ssh}" "$@"
[ -n "$__UTOOLS_FORCE_SSH" ] && export GIT_SSH="$__UTOOLS_FORCE_SSH"
exec "${__UTOOLS_FORCE_SSH:-ssh}" "$@"

View File

@ -187,7 +187,9 @@ done
# Traiter les commandes
function use_ssh_wrapper() {
local __UTOOLS_FORCE_PATH="$PATH"
__UTOOLS_FORCE_PATH="$PATH"
__UTOOLS_FORCE_SSH="${GIT_SSH:-ssh}"
export __UTOOLS_FORCE_PATH __UTOOLS_FORCE_SSH
udelpath "$scriptdir/lib/ssh-wrapper" __UTOOLS_FORCE_PATH
uinspath "$scriptdir/lib/ssh-wrapper" PATH
}