diff --git a/lib/ulib/runsmod b/lib/ulib/runsmod index 017545e..b2674e9 100644 --- a/lib/ulib/runsmod +++ b/lib/ulib/runsmod @@ -3,7 +3,7 @@ ##@cooked nocomments ##@require base uprovide runsmod -urequire base +urequire base vcs function __runsmod_loadconf() { # Charger le fichier de configuration $1. Les paramètres RUNSMOD_MODE, @@ -373,7 +373,11 @@ function __runsmod_clone_or_pull() { if [ -n "$RUNSMOD_CLONE" ]; then estepi "clone $(ppath "$repodir") [$repourl]" mkdirof "$repodir" - git clone ${RUNSMOD_SHALLOW:+--depth 1} "$repourl" "$repodir" + git clone ${RUNSMOD_SHALLOW:+--depth 1} "$repourl" "$repodir" || return $? + if [ "$RUNSMOD_MODE" == devel ]; then + ( cd "$repodir"; git_have_rbranch develop && git checkout develop ) || return $? + fi + git_annex_initial "$repodir" || return $? return $? else estepe "noclone $(ppath "$repodir")" diff --git a/lib/ssh-wrapper/rsync b/lib/ulib/support/ssh-wrapper/rsync similarity index 100% rename from lib/ssh-wrapper/rsync rename to lib/ulib/support/ssh-wrapper/rsync diff --git a/lib/ssh-wrapper/ssh b/lib/ulib/support/ssh-wrapper/ssh similarity index 100% rename from lib/ssh-wrapper/ssh rename to lib/ulib/support/ssh-wrapper/ssh diff --git a/lib/ulib/vcs b/lib/ulib/vcs index 6c41d9c..e9923dd 100644 --- a/lib/ulib/vcs +++ b/lib/ulib/vcs @@ -3,7 +3,7 @@ ##@cooked nocomments ##@require base uprovide vcs -urequire base +urequire ulib base ################################################################################ # Général @@ -772,6 +772,14 @@ function git_is_merged() { } # fonctions pour git annex +function git_annex_use_ssh_wrapper() { + __UTOOLS_FORCE_PATH="$PATH" + __UTOOLS_FORCE_SSH="${GIT_SSH:-ssh}" + export __UTOOLS_FORCE_PATH __UTOOLS_FORCE_SSH + udelpath "$ULIBDIR/support/ssh-wrapper" __UTOOLS_FORCE_PATH + uinspath "$ULIBDIR/support/ssh-wrapper" PATH +} + function git_annex_initial() { # sur le dépôt $1 fraichement cloné, vérifier s'il faut faire git annex # init. Si oui, l'initialiser avec le nom d'hôte, et récupérer tous les diff --git a/uproject b/uproject index 900a815..9e48dbc 100755 --- a/uproject +++ b/uproject @@ -217,14 +217,6 @@ done ################################################################################ # Traiter les commandes -function use_ssh_wrapper() { - __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 -} - if [ "$CMD" == "grep" ]; then ## grep if [ $# -eq 1 -a "$1" == "--help" ]; then @@ -259,7 +251,7 @@ elif array_contains GITANNEX_CMDS "$CMD"; then git annex sync fi } - use_ssh_wrapper + git_annex_use_ssh_wrapper case "$CMD" in annex) git annex "$@";; xsync) xsync;; @@ -280,7 +272,7 @@ elif [ "$CMD" == clone ]; then fi [ -d "$destdir" ] && die "$(ppath "$destdir"): répertoire existant" - use_ssh_wrapper + git_annex_use_ssh_wrapper git clone "$repourl" "$destdir" || die ( cd "$destdir"; git_have_rbranch develop && git checkout develop ) || die git_annex_initial "$destdir" || die @@ -307,7 +299,7 @@ elif [ "$CMD" == crone ]; then userhost="$user@$host" [ -n "$path" ] || die "Vous devez spécifier le chemin du dépôt git" - use_ssh_wrapper + git_annex_use_ssh_wrapper ssh "$userhost" create "$path" || die if [ -n "$tmpdestdir" ]; then setxx destname=abspath "$destdir" // basename