Fix test mode

This commit is contained in:
Joshua Bussdieker
2012-03-01 22:05:42 -08:00
parent 081f7ea235
commit d7f0b47e17
+5 -6
View File
@@ -1,14 +1,8 @@
#!/bin/bash
. $GVM_ROOT/scripts/functions
if [ "$1" == "--test" ]; then
test=true
fi
download_source() {
GO_CACHE_PATH=$GVM_ROOT/archive/go
if [ "$test" != "true" ]; then
GO_SOURCE_URL=https://go.googlecode.com/hg/
fi
[ -d $GO_CACHE_PATH ] && return
echo "Downloading Go source... $GO_SOURCE_URL"
hg clone $GO_SOURCE_URL $GO_CACHE_PATH >> $GVM_ROOT/logs/go-download.log 2>&1 ||
@@ -115,6 +109,11 @@ install_goprotobuf() {
main() {
VERSION=$1
if [ "$2" != "" ]; then
GO_SOURCE_URL=$2
else
GO_SOURCE_URL=https://go.googlecode.com/hg/
fi
trap 'display_error "Canceled!"' INT
# GREEN!
tput sgr0