diff --git a/website/static/install/proto.ps1 b/website/static/install/proto.ps1 index 0051e7db511..b5a71c00285 100755 --- a/website/static/install/proto.ps1 +++ b/website/static/install/proto.ps1 @@ -21,7 +21,13 @@ $DownloadUrl = if ($Version -eq "latest") { $TempDir = "${HOME}\.proto\temp\proto\${Target}" $DownloadFile = "${TempDir}.zip" -$InstallDir = "${Home}\.proto\bin" + +$InstallDir = if ($env:PROTO_INSTALL_DIR) { + $env:PROTO_INSTALL_DIR +} else { + "${Home}\.proto\bin" +} + $BinPath = "${InstallDir}\proto.exe" # Download and unpack in temp dir diff --git a/website/static/install/proto.sh b/website/static/install/proto.sh index a35732aeed0..6f66f2b8505 100755 --- a/website/static/install/proto.sh +++ b/website/static/install/proto.sh @@ -51,7 +51,13 @@ fi temp_dir="$HOME/.proto/temp/proto/$target" download_file="$temp_dir$ext" -install_dir="$HOME/.proto/bin" + +if [ -z "$PROTO_INSTALL_DIR" ]; then + install_dir="$HOME/.proto/bin" +else + install_dir="$PROTO_INSTALL_DIR" +fi + bin_path="$install_dir/$bin" # Download and unpack in temp dir