gfx/graphite2/moz-gr-update.sh

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/graphite2/moz-gr-update.sh	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +#!/bin/bash
     1.5 +
     1.6 +# Script used to update the Graphite2 library in the mozilla source tree
     1.7 +
     1.8 +# This script lives in gfx/graphite2, along with the library source,
     1.9 +# but must be run from the top level of the mozilla-central tree.
    1.10 +
    1.11 +# It expects to find a checkout of the graphite2 tree in a directory "graphitedev"
    1.12 +# alongside the current mozilla tree that is to be updated.
    1.13 +# Expect error messages from the copy commands if this is not found!
    1.14 +
    1.15 +# copy the source and headers
    1.16 +cp -R ../graphitedev/src/* gfx/graphite2/src
    1.17 +cp ../graphitedev/include/graphite2/* gfx/graphite2/include/graphite2
    1.18 +
    1.19 +# record the upstream changeset that was used
    1.20 +CHANGESET=$(cd ../graphitedev/ && hg log | head -n 1 | cut -d : -f 1,3 | sed -e 's/:/ /')
    1.21 +echo "This directory contains the Graphite2 library from http://hg.palaso.org/graphitedev\n" > gfx/graphite2/README.mozilla
    1.22 +echo "Current version derived from upstream" $CHANGESET >> gfx/graphite2/README.mozilla
    1.23 +echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla
    1.24 +
    1.25 +# fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
    1.26 +find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
    1.27 +find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
    1.28 +
    1.29 +# summarize what's been touched
    1.30 +echo Updated to $CHANGESET.
    1.31 +echo Here is what changed in the gfx/graphite2 directory:
    1.32 +echo
    1.33 +
    1.34 +hg stat gfx/graphite2
    1.35 +
    1.36 +echo
    1.37 +echo If gfx/graphite2/src/files.mk has changed, please make corresponding
    1.38 +echo changes to gfx/graphite2/src/moz.build
    1.39 +echo
    1.40 +
    1.41 +echo
    1.42 +echo Now use hg commands to create a patch for the mozilla tree.
    1.43 +echo

mercurial