Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | #!/bin/bash |
michael@0 | 2 | # A script to generate toolkit/components/downloads/csd.pb.{cc,h} for use in |
michael@0 | 3 | # nsIApplicationReputationQuery. This script assumes you have downloaded and |
michael@0 | 4 | # installed the protocol buffer compiler. |
michael@0 | 5 | |
michael@0 | 6 | if [ -n $PROTOC_PATH ]; then |
michael@0 | 7 | PROTOC_PATH=/usr/local/bin/protoc |
michael@0 | 8 | fi |
michael@0 | 9 | |
michael@0 | 10 | echo "Using $PROTOC_PATH as protocol compiler" |
michael@0 | 11 | |
michael@0 | 12 | if [ ! -e $PROTOC_PATH ]; then |
michael@0 | 13 | echo "You must install the protocol compiler from " \ |
michael@0 | 14 | "https://code.google.com/p/protobuf/downloads/list" |
michael@0 | 15 | exit 1 |
michael@0 | 16 | fi |
michael@0 | 17 | |
michael@0 | 18 | # Get the protocol buffer and compile it |
michael@0 | 19 | CMD='wget http://src.chromium.org/chrome/trunk/src/chrome/common/safe_browsing/csd.proto -O csd.proto' |
michael@0 | 20 | OUTPUT_PATH=toolkit/components/downloads |
michael@0 | 21 | |
michael@0 | 22 | $CMD |
michael@0 | 23 | $PROTOC_PATH csd.proto --cpp_out=$OUTPUT_PATH |