From a31f8c29ee486ddad979ac679959a2103d6cf2f9 Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Mon, 9 May 2016 17:54:58 +0400 Subject: [PATCH] =?UTF-8?q?changer=20la=20convention=20de=20nommage=20pour?= =?UTF-8?q?=20les=20r=C3=A9pertoires=20~/runs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/ulib/runsmod | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/ulib/runsmod b/lib/ulib/runsmod index 662e86a..961d5a2 100644 --- a/lib/ulib/runsmod +++ b/lib/ulib/runsmod @@ -129,19 +129,21 @@ function __runsmod_fixurl() { function __runsmod_getpath_from_baseurl() { # obtenir le nom correspond à un url de base, utilisable dans un chemin - local url="$1" path userhost user host dummy + local url="$1" scheme path userhost user host dummy case "$url" in http:*|https:*) - path="${url%/}" + scheme="${url%%:*}" + path="${url#*://}" + path="${path%/}" path="${path/:\/\//_}" path="${path//\//_}" - echo "$path" + echo "${path}_${scheme}" return ;; *) splitpair "$url" userhost dummy splituserhost "$userhost" user host - echo "ssh_${user}_${host}" + echo "${host}_${user}_ssh" ;; esac }