summarylogtreecommitdiffstats
path: root/helper.sh
diff options
context:
space:
mode:
Diffstat (limited to 'helper.sh')
-rw-r--r--helper.sh24
1 files changed, 21 insertions, 3 deletions
diff --git a/helper.sh b/helper.sh
index 330e225f0b4a..b32164d31d6b 100644
--- a/helper.sh
+++ b/helper.sh
@@ -10,6 +10,9 @@ function go_get {
elif [[ $1 == code.google.com* ]]
then
get_hg $1 $2 $3
+ elif [[ $1 == golang.org* ]]
+ then
+ get_golang $1 $2 $3
else
go get $1
fi
@@ -23,14 +26,14 @@ function get_git {
if [[ $3 != "master" ]] && [[ ${3:0} == commit* ]]
then
cd $2
- git checkout ${3:7}
+ git checkout -q ${3:7}
elif [[ $3 != "master" ]] && [[ ${3:0} == tag* ]]
then
cd $2
- git checkout tags/${3:4}
+ git checkout -q tags/${3:4}
else
cd $2
- git checkout ${3:7}
+ git checkout -q ${3:7}
fi
}
@@ -46,6 +49,21 @@ function get_hg {
fi
}
+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
+
+}
+
# Read the .gopmfile file and clone the branch/commits of the depends
# $1 = .gopmfile file path
# $2 = target directory path