7184406: Adjust get_source/hgforest script to allow for trailing // characters
authorohair
Mon, 16 Jul 2012 11:43:23 -0700
changeset 13190 9a809edf1ff6
parent 13187 b820143a6f1c
child 13191 60b5f491c654
7184406: Adjust get_source/hgforest script to allow for trailing // characters Reviewed-by: tbell
make/scripts/hgforest.sh
--- a/make/scripts/hgforest.sh	Wed Jul 05 18:16:12 2017 +0200
+++ b/make/scripts/hgforest.sh	Mon Jul 16 11:43:23 2012 -0700
@@ -98,7 +98,8 @@
   (
     (
       if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
-        cline="hg clone ${pull_default}/${i} ${i}"
+        pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
+        cline="hg clone ${pull_newrepo} ${i}"
         echo "# ${cline}"
         ( eval "${cline}" )
       else
@@ -121,7 +122,8 @@
     n=`expr ${n} '+' 1`
     (
       (
-          cline="hg clone ${pull_extra}/${i} ${i}"
+          pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
+          cline="hg clone ${pull_newextrarepo} ${i}"
           echo "# ${cline}"
           ( eval "${cline}" )
         echo "# exit code $?"