diff --git a/scripts/install b/scripts/install index 657918f..66ce055 100755 --- a/scripts/install +++ b/scripts/install @@ -43,13 +43,13 @@ compile_go() { } create_enviroment() { - new_env_file=$GVM_ROOT/environments/$version - echo "export GVM_ROOT; GVM_ROOT=\"$GVM_ROOT\"" > $new_env_file - echo "export gvm_go_name; gvm_go_name=\"$version\"" >> $new_env_file - echo "unset gvm_pkgset_name" >> $new_env_file - echo "export GOROOT; GOROOT=\"\$GVM_ROOT/gos/$version\"" >> $new_env_file - echo "export GOPATH; GOPATH=\"\$GVM_ROOT/pkgsets/$version/global\"" >> $new_env_file - echo "export PATH; PATH=\"\$GVM_ROOT/pkgsets/$version/global/bin:\$GVM_ROOT/gos/$version/bin:\$GVM_ROOT/bin:\$PATH\"" >> $new_env_file + new_env_file=$GVM_ROOT/environments/$version + echo "export GVM_ROOT; GVM_ROOT=\"$GVM_ROOT\"" > $new_env_file + echo "export gvm_go_name; gvm_go_name=\"$version\"" >> $new_env_file + echo "unset gvm_pkgset_name" >> $new_env_file + echo "export GOROOT; GOROOT=\"\$GVM_ROOT/gos/$version\"" >> $new_env_file + echo "export GOPATH; GOPATH=\"\$GVM_ROOT/pkgsets/$version/global\"" >> $new_env_file + echo "export PATH; PATH=\"\$GVM_ROOT/pkgsets/$version/global/bin:\$GVM_ROOT/gos/$version/bin:\$GVM_ROOT/bin:\$PATH\"" >> $new_env_file . $GVM_ROOT/scripts/env/use gvm_use $version gvm pkgset create global @@ -84,31 +84,31 @@ install_go() { } install_gb() { - echo " * Installing gb..." - goinstall github.com/skelterjohn/go-gb/gb - if [[ $? -ne 0 ]]; then - echo "Failed to install gb" - exit 1 - fi + echo " * Installing gb..." + goinstall github.com/skelterjohn/go-gb/gb + if [[ $? -ne 0 ]]; then + echo "Failed to install gb" + exit 1 + fi } install_goprotobuf() { - echo " * Installing goprotobuf..." - if [[ "$version" == "release.r60.3" ]]; then - goinstall goprotobuf.googlecode.com/hg/proto - if [[ $? -ne 0 ]]; then - echo "Failed to install goprotobuf" - exit 1 - fi - cd $GVM_ROOT/pkgsets/$version/global/src/goprotobuf.googlecode.com/hg/compiler - make install > $GVM_ROOT/logs/$version-pb-compiler.log 2>&1 - if [[ $? -ne 0 ]]; then - echo "Failed to install goprotobuf compiler" - exit 1 - fi - else - echo " Don't know how to install goprotobuf for $version" - fi + echo " * Installing goprotobuf..." + if [[ "$version" == "release.r60.3" ]]; then + goinstall goprotobuf.googlecode.com/hg/proto + if [[ $? -ne 0 ]]; then + echo "Failed to install goprotobuf" + exit 1 + fi + cd $GVM_ROOT/pkgsets/$version/global/src/goprotobuf.googlecode.com/hg/compiler + make install > $GVM_ROOT/logs/$version-pb-compiler.log 2>&1 + if [[ $? -ne 0 ]]; then + echo "Failed to install goprotobuf compiler" + exit 1 + fi + else + echo " Don't know how to install goprotobuf for $version" + fi } main() { @@ -121,8 +121,8 @@ main() { download_source check_tag || (update_source && check_tag) || display_error "Unrecognized Go version" install_go - install_gb - install_goprotobuf + install_gb + install_goprotobuf } main $@