|
1 #!/bin/bash |
|
2 |
|
3 # Script used to update the Graphite2 library in the mozilla source tree |
|
4 |
|
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. |
|
7 |
|
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! |
|
11 |
|
12 # copy the source and headers |
|
13 cp -R ../graphitedev/src/* gfx/graphite2/src |
|
14 cp ../graphitedev/include/graphite2/* gfx/graphite2/include/graphite2 |
|
15 |
|
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/graphite2/README.mozilla |
|
19 echo "Current version derived from upstream" $CHANGESET >> gfx/graphite2/README.mozilla |
|
20 echo "\nSee" $0 "for update procedure.\n" >> gfx/graphite2/README.mozilla |
|
21 |
|
22 # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h) |
|
23 find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; |
|
24 find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \; |
|
25 |
|
26 # summarize what's been touched |
|
27 echo Updated to $CHANGESET. |
|
28 echo Here is what changed in the gfx/graphite2 directory: |
|
29 echo |
|
30 |
|
31 hg stat gfx/graphite2 |
|
32 |
|
33 echo |
|
34 echo If gfx/graphite2/src/files.mk has changed, please make corresponding |
|
35 echo changes to gfx/graphite2/src/moz.build |
|
36 echo |
|
37 |
|
38 echo |
|
39 echo Now use hg commands to create a patch for the mozilla tree. |
|
40 echo |