toolkit/components/downloads/generate_csd.sh

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rwxr-xr-x

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

     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.
     6 if [ -n $PROTOC_PATH ]; then
     7   PROTOC_PATH=/usr/local/bin/protoc
     8 fi
    10 echo "Using $PROTOC_PATH as protocol compiler"
    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
    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
    22 $CMD
    23 $PROTOC_PATH csd.proto --cpp_out=$OUTPUT_PATH

mercurial