Skip to content

Commit

Permalink
new: Customize proto install directory. (#1213)
Browse files Browse the repository at this point in the history
  • Loading branch information
milesj authored Dec 3, 2023
1 parent 3e384e8 commit 0771c0d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
8 changes: 7 additions & 1 deletion website/static/install/proto.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion website/static/install/proto.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0771c0d

Please sign in to comment.