summarylogtreecommitdiffstats
path: root/helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'helper.sh')
-rw-r--r--helper.sh18
1 files changed, 7 insertions, 11 deletions
diff --git a/helper.sh b/helper.sh
index b32164d31d6b..fd8bea0426be 100644
--- a/helper.sh
+++ b/helper.sh
@@ -50,18 +50,14 @@ function get_hg {
}
function get_golang {
- if [[ $1 == "golang.org/x/net" ]]
- then
- echo $1 $2 $3
- get_git "github.com/golang/net" $2
- elif [[ $1 == "golang.org/x/text" ]]
- then
- echo $1 $2 $3
- get_git "github.com/golang/text" $2
- else
- echo $1 $2 $3
- fi
+ local package=$1
+ local match="golang.org/x"
+ local replace="github.com/golang"
+ local result=""
+
+ result=${package/$match/$replace}
+ get_git $result $2 $3
}
# Read the .gopmfile file and clone the branch/commits of the depends