diff options
author | Thomas Fanninger | 2015-08-23 15:33:50 +0200 |
---|---|---|
committer | Thomas Fanninger | 2015-08-23 15:33:50 +0200 |
commit | d6705d775c818cbf285ef0576a22cef3c50ef4ee (patch) | |
tree | 174b76899be0b5ef97a6c11500cd65325612ec07 /helper.sh | |
parent | 6a81e0df0343274fb44fef028c3469a94a5a37a3 (diff) | |
download | aur-d6705d775c818cbf285ef0576a22cef3c50ef4ee.tar.gz |
Update build script + add some workarounds
Diffstat (limited to 'helper.sh')
-rw-r--r-- | helper.sh | 24 |
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 |