toolkit/components/downloads/generate_csd.sh

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

mercurial