3 # Script used to update the Graphite2 library in the mozilla source tree
5 # This script lives in gfx/graphite2, along with the library source,
6 # but must be run from the top level of the mozilla-central tree.
8 # It expects to find a checkout of the graphite2 tree in a directory "graphitedev"
9 # alongside the current mozilla tree that is to be updated.
10 # Expect error messages from the copy commands if this is not found!
12 # copy the source and headers
13 cp -R ..
/graphitedev
/src
/* gfx
/graphite
2/src
14 cp ..
/graphitedev
/include
/graphite
2/* gfx
/graphite
2/include
/graphite2
16 # record the upstream changeset that was used
17 CHANGESET
=$
(cd ..
/graphitedev
/ && hg log |
head -n 1 | cut
-d : -f 1,3 |
sed -e 's/:/ /')
18 echo "This directory contains the Graphite2 library from http://hg.palaso.org/graphitedev\n" > gfx
/graphite
2/README.mozilla
19 echo "Current version derived from upstream" $CHANGESET >> gfx
/graphite
2/README.mozilla
20 echo "\nSee" $0 "for update procedure.\n" >> gfx
/graphite
2/README.mozilla
22 # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
23 find gfx
/graphite
2/ -name "*.cpp" -exec perl
-p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \
;
24 find gfx
/graphite
2/ -name "*.h" -exec perl
-p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \
;
26 # summarize what's been touched
27 echo Updated to
$CHANGESET.
28 echo Here is what changed
in the gfx
/graphite2 directory
:
34 echo If gfx
/graphite
2/src
/files.mk has changed
, please
make corresponding
35 echo changes to gfx
/graphite
2/src
/moz.build
39 echo Now use hg commands to create a
patch for the mozilla tree.