mirror of
https://github.com/wahyd4/gvm.git
synced 2026-08-09 04:46:19 +10:00
Making all prefer-binary bits consistent
This commit is contained in:
@@ -42,7 +42,7 @@ Additional options can be specified when installing Go:
|
||||
-pb, --with-protobuf Install Go protocol buffers.
|
||||
-b, --with-build-tools Install package build tools.
|
||||
-B, --binary Only install from binary.
|
||||
--preferbinary Attempt a binary install, falling back to source.
|
||||
--prefer-binary Attempt a binary install, falling back to source.
|
||||
-h, --help Display this message.
|
||||
|
||||
List Go Versions
|
||||
|
||||
+3
-2
@@ -8,6 +8,7 @@ function show_usage() {
|
||||
echo " -pb, --with-protobuf Install Go protocol buffers."
|
||||
echo " -b, --with-build-tools Install package build tools."
|
||||
echo " -B, --binary Only install from binary."
|
||||
echo " --prefer-binary Attempt a binary install, falling back to source."
|
||||
echo " -h, --help Display this message."
|
||||
}
|
||||
|
||||
@@ -39,7 +40,7 @@ read_command_line() {
|
||||
INSTALL_SOURCE="binary"
|
||||
;;
|
||||
--prefer-binary)
|
||||
INSTALL_SOURCE="preferbinary"
|
||||
INSTALL_SOURCE="prefer-binary"
|
||||
;;
|
||||
-h|--help)
|
||||
show_usage
|
||||
@@ -309,7 +310,7 @@ main() {
|
||||
|
||||
if [[ "x$INSTALL_SOURCE" == "xbinary" ]]; then
|
||||
install_go_binary
|
||||
elif [[ "x$INSTALL_SOURCE" == "xpreferbinary" ]]; then
|
||||
elif [[ "x$INSTALL_SOURCE" == "xprefer-binary" ]]; then
|
||||
install_go_binary || {
|
||||
display_message "Falling back to source installation of $GO_NAME"
|
||||
install_from_source
|
||||
|
||||
@@ -1 +1 @@
|
||||
gvm install go1.2 --preferbinary #status=0
|
||||
gvm install go1.2 --prefer-binary #status=0
|
||||
|
||||
Reference in New Issue
Block a user