toolkit/crashreporter/update-breakpad.sh

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rwxr-xr-x

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

     1 #!/bin/bash
     2 # This Source Code Form is subject to the terms of the Mozilla Public
     3 # License, v. 2.0. If a copy of the MPL was not distributed with this
     4 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6 # Usage: update-breakpad.sh <path to breakpad SVN>
     8 if [ $# -lt 1 ]; then
     9   echo "Usage: update-breakpad.sh /path/to/google-breakpad/"
    10   exit 1
    11 fi
    13 crashreporter_dir=`dirname $0`
    14 repo=${crashreporter_dir}/../..
    15 rm -rf ${crashreporter_dir}/google-breakpad
    16 svn export $1 ${crashreporter_dir}/google-breakpad
    18 # remove some extraneous bits
    19 rm -rf ${crashreporter_dir}/google-breakpad/src/third_party/protobuf ${crashreporter_dir}/google-breakpad/src/testing/ ${crashreporter_dir}/google-breakpad/src/tools/gyp/
    20 # restore our Makefile.ins
    21 hg -R ${repo} st -n | grep "Makefile\.in$" | xargs hg revert --no-backup
    22 # and moz.build files
    23 hg -R ${repo} st -n | grep "moz\.build$" | xargs hg revert --no-backup
    24 # and some other makefiles
    25 hg -R ${repo} st -n | grep "objs\.mk$" | xargs hg revert --no-backup
    27 # Record `svn info`
    28 svn info $1 > ${crashreporter_dir}/google-breakpad/SVN-INFO
    30 # Apply any local patches
    31 shopt -s nullglob
    32 for p in ${crashreporter_dir}/breakpad-patches/*.patch; do
    33     if grep -q -e "--git" $p; then
    34         patch_opts="-p1"
    35     else
    36         patch_opts="-p0"
    37     fi
    38     echo "Applying $p"
    39     if ! filterdiff -x '*/Makefile*' $p | \
    40         patch -d ${crashreporter_dir}/google-breakpad ${patch_opts}; then
    41       echo "Failed to apply $p"
    42       exit 1
    43     fi
    44 done
    45 # remove any .orig files that snuck in
    46 find ${crashreporter_dir}/google-breakpad -name "*.orig" -print0 | xargs -0 rm
    48 hg addremove ${crashreporter_dir}/google-breakpad/

mercurial