michael@0: #!/bin/bash michael@0: # A script to generate toolkit/components/downloads/csd.pb.{cc,h} for use in michael@0: # nsIApplicationReputationQuery. This script assumes you have downloaded and michael@0: # installed the protocol buffer compiler. michael@0: michael@0: if [ -n $PROTOC_PATH ]; then michael@0: PROTOC_PATH=/usr/local/bin/protoc michael@0: fi michael@0: michael@0: echo "Using $PROTOC_PATH as protocol compiler" michael@0: michael@0: if [ ! -e $PROTOC_PATH ]; then michael@0: echo "You must install the protocol compiler from " \ michael@0: "https://code.google.com/p/protobuf/downloads/list" michael@0: exit 1 michael@0: fi michael@0: michael@0: # Get the protocol buffer and compile it michael@0: CMD='wget http://src.chromium.org/chrome/trunk/src/chrome/common/safe_browsing/csd.proto -O csd.proto' michael@0: OUTPUT_PATH=toolkit/components/downloads michael@0: michael@0: $CMD michael@0: $PROTOC_PATH csd.proto --cpp_out=$OUTPUT_PATH