Skip to content

Commit 24ed656

Browse files
authored
Install Protobuf on OSX (aws#207)
1 parent 516e87f commit 24ed656

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

config/protoc_downloader.sh

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
#!/bin/bash
2-
apt-get install sudo
3-
sudo apt-get install unzip
4-
PROTOC_ZIP=protoc-3.7.1-linux-x86_64.zip
2+
unameOut="$(uname -s)"
3+
case "${unameOut}" in
4+
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
515
curl -OL https://github.com/google/protobuf/releases/download/v3.7.1/$PROTOC_ZIP
616
unzip -o $PROTOC_ZIP -d /usr/local bin/protoc
717
unzip -o $PROTOC_ZIP -d /usr/local include/*

0 commit comments

Comments
 (0)