changeset 636:d2b1fdd8ee0a jdk7u21-b04

7184406: Adjust get_source/hgforest script to allow for trailing // characters Reviewed-by: tbell
author ohair
date Mon, 16 Jul 2012 11:37:13 -0700
parents dd037cebb1da
children df8768f7e1a4
files make/scripts/hgforest.sh
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/scripts/hgforest.sh	Fri Jun 08 17:25:46 2012 -0700
+++ b/make/scripts/hgforest.sh	Mon Jul 16 11:37:13 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 $?"