We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 516e87f commit 24ed656Copy full SHA for 24ed656
config/protoc_downloader.sh
@@ -1,7 +1,17 @@
1
#!/bin/bash
2
-apt-get install sudo
3
-sudo apt-get install unzip
4
-PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip
+unameOut="$(uname -s)"
+case "${unameOut}" in
+ Linux*) machine=Linux;;
5
+ Darwin*) machine=Mac;;
6
+esac
7
+if [ "$machine" = "Mac" ] ; then
8
+ PROTOC_ZIP=protoc-3.7.1-osx-x86_64.zip
9
+ brew install unzip
10
+else
11
+ PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip
12
+ apt-get install sudo
13
+ sudo apt-get install unzip
14
+fi
15
curl -OL https://github.com/google/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
16
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
17
unzip -o $PROTOC_ZIP -d /usr/local include/*
0 commit comments