Skip to content

Instantly share code, notes, and snippets.

@JonCanning
Created February 6, 2025 17:18
Show Gist options
  • Save JonCanning/ef40bfb88d4bb768aa5500c7570e1fb8 to your computer and use it in GitHub Desktop.
Save JonCanning/ef40bfb88d4bb768aa5500c7570e1fb8 to your computer and use it in GitHub Desktop.
Get latest protoc
version=$(curl -s -L -o /dev/null -w '%{url_effective}' https://github.com/protocolbuffers/protobuf/releases/latest | grep -oP 'tag/\Kv[^/]+')
version=${version#v}
url="https://github.com/protocolbuffers/protobuf/releases/download/v$version/protoc-$version-linux-x86_64.zip"
curl -O "$url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment