| 1 | #!/bin/bash |
| 2 | # Installs protobuf compiler. Should be run as root. |
| 3 | set -e |
| 4 | |
| 5 | if [[ $1 == x86_64* ]]; then |
| 6 | ARCH=x86_64 |
| 7 | else |
| 8 | # gnu target |
| 9 | ARCH=aarch_64 |
| 10 | fi |
| 11 | |
| 12 | PB_REL=https://github.com/protocolbuffers/protobuf/releases |
| 13 | PB_VERSION=23.1 |
| 14 | curl -LO $PB_REL/download/v$PB_VERSION/protoc-$PB_VERSION-linux-$ARCH.zip |
| 15 | unzip protoc-$PB_VERSION-linux-$ARCH.zip -d /usr/local |