streamline download/install process

(get binary only, eliminate unnecessary intermediate files)
pull/857/head
nivesh 2026-01-21 05:03:33 -05:00 committed by ginuerzh
parent 646d3f906c
commit bc96fe3918
1 changed files with 6 additions and 10 deletions

View File

@ -68,18 +68,14 @@ install_gost() {
get_download_url="$base_url/tags/$version"
download_url=$(curl -s "$get_download_url" | awk -F'"' -v re=".*${os}.*${cpu_arch}.*" '/"browser_download_url":/ && $4 ~ re { print $4 }')
# Download the binary
echo "Downloading gost version $version..."
curl -fsSL -o gost.tar.gz $download_url
# Extract and install the binary
echo "Installing gost..."
tar -xzf gost.tar.gz
chmod +x gost
mv gost /usr/local/bin/gost
# Download and install the binary
install_path="/usr/local/bin"
echo "Downloading and installing gost version $version..."
curl -fsSL "$download_url" | tar -xzC "$install_path" gost
chmod +x "$install_path/gost"
# Remove binary from macOS quarantine when installing for first time
[[ "$os" == "darwin" ]] && { xattr -d com.apple.quarantine /usr/local/bin/gost 2>&-; }
[[ "$os" == "darwin" ]] && { xattr -d com.apple.quarantine "$install_path/gost" 2>&-; }
echo "gost installation completed!"
}