diff --git a/scripts/install_protoc.sh b/scripts/install_protoc.sh index 922b4527be8c..c6fb87aea683 100755 --- a/scripts/install_protoc.sh +++ b/scripts/install_protoc.sh @@ -54,9 +54,11 @@ case "$(uname -m)" in esac # Detect the Operating System +INSTALL_PATH=${1:+"$1"} +echo "Got install path as : $INSTALL_PATH" case "$(uname -s)" in - "Darwin") download_binary $ARCH "osx" "$1";; - "Linux") download_binary $ARCH "linux" "$1";; + "Darwin") download_binary $ARCH "osx" "$INSTALL_PATH";; + "Linux") download_binary $ARCH "linux" "$INSTALL_PATH";; *) die "Unsupported OS. Please consider manual installation from \ https://github.com/protocolbuffers/protobuf/releases/ and add to PATH" ;; esac