From 34dbba9991b7d1aa3225cd5e4a0cfe3a071adcfc Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Sat, 4 Jun 2016 14:48:23 +0400 Subject: [PATCH] =?UTF-8?q?support=20de=20l'utilisation=20des=20valeurs=20?= =?UTF-8?q?sp=C3=A9cifiques=20de=20GIT=5FANNEX=20pour=20rsync=20avec=20git?= =?UTF-8?q?-annex?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ssh-wrapper/rsync | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 lib/ssh-wrapper/rsync diff --git a/lib/ssh-wrapper/rsync b/lib/ssh-wrapper/rsync new file mode 100755 index 0000000..62bdd34 --- /dev/null +++ b/lib/ssh-wrapper/rsync @@ -0,0 +1,22 @@ +#!/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. +args=() +if [ -n "$__UTOOLS_FORCE_SSH" ]; then + # corriger la valeur de l'argument -e s'il existe + while [ $# -gt 0 ]; do + if [ "$1" == -e ]; then + args=("${args[@]}" -e "$__UTOOLS_FORCE_SSH ${2#* }") + shift; shift + break + fi + args=("${args[@]}" "$1") + shift + done +fi +args=("${args[@]}" "$@") +[ -n "$__UTOOLS_FORCE_PATH" ] && export PATH="$__UTOOLS_FORCE_PATH" +export UTOOLS_USSH_RSYNC_SUPPORT=1 +exec rsync "${args[@]}"