commit
dac245e13f
|
@ -138,11 +138,11 @@ def configureLinuxProvisioners(vmCfg)
|
|||
|
||||
vmCfg.vm.provision "shell",
|
||||
privileged: true,
|
||||
path: './scripts/vagrant-linux-protoc.sh'
|
||||
path: './scripts/vagrant-linux-priv-ui.sh'
|
||||
|
||||
vmCfg.vm.provision "shell",
|
||||
privileged: false,
|
||||
path: './scripts/vagrant-linux-priv-ui.sh'
|
||||
privileged: true,
|
||||
path: './scripts/vagrant-linux-priv-protoc.sh'
|
||||
|
||||
return vmCfg
|
||||
end
|
||||
|
|
|
@ -0,0 +1,32 @@
|
|||
# Make sure you grab the latest version
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -o errexit
|
||||
|
||||
VERSION=3.6.1
|
||||
DOWNLOAD=https://github.com/google/protobuf/releases/download/v${VERSION}/protoc-${VERSION}-linux-x86_64.zip
|
||||
|
||||
function install_protoc() {
|
||||
if [[ -e /usr/local/bin/protoc ]] ; then
|
||||
if [ "${VERSION}" = "$(protoc --version | cut -d ' ' -f 2)" ] ; then
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
# Download
|
||||
wget -q -O /tmp/protoc.zip ${DOWNLOAD}
|
||||
|
||||
# Unzip
|
||||
unzip /tmp/protoc.zip -d /tmp/protoc3
|
||||
|
||||
# Move protoc to /usr/local/bin/
|
||||
sudo mv /tmp/protoc3/bin/* /usr/local/bin/
|
||||
|
||||
# Move protoc3/include to /usr/local/include/
|
||||
sudo mv /tmp/protoc3/include/* /usr/local/include/
|
||||
|
||||
# Link
|
||||
sudo ln -s /usr/local/bin/protoc /usr/bin/protoc
|
||||
}
|
||||
|
||||
install_protoc
|
|
@ -1,8 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# set up protoc so that we can use it for protobuf generation
|
||||
PROTOC_ZIP=protoc-3.6.1-linux-x86_64.zip
|
||||
curl -OL https://github.com/google/protobuf/releases/download/v3.6.1/$PROTOC_ZIP
|
||||
sudo unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
|
||||
rm -f $PROTOC_ZIP
|
||||
|
Loading…
Reference in New Issue