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.
10 # ./gfx/graphite2/moz-gr-update.sh RELEASE
12 # where RELEASE is the graphite2 release to be used, e.g. "1.3.4".
16 if [ "x$RELEASE" == "x" ]
18 echo "Must provide the version number to be used."
22 TARBALL
="https://github.com/silnrsi/graphite/releases/download/$RELEASE/graphite2-minimal-$RELEASE.tgz"
25 TMPFILE
=`mktemp -t ${foo}.XXX` ||
exit 1
27 curl
-L "$TARBALL" -o "$TMPFILE"
28 tar -x -z -C gfx
/graphite
2/ --strip-components 1 -f "$TMPFILE" ||
exit 1
31 echo "This directory contains the Graphite2 library release $RELEASE from" > gfx
/graphite
2/README.mozilla
32 echo "$TARBALL" >> gfx
/graphite
2/README.mozilla
34 echo "See" $0 "for update procedure." >> gfx
/graphite
2/README.mozilla
36 # fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
37 #find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
38 #find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
40 # summarize what's been touched
41 echo Updated to
$RELEASE.
42 echo Here is what changed
in the gfx
/graphite2 directory
:
48 echo If gfx
/graphite
2/src
/files.mk has changed
, please
make corresponding
49 echo changes to gfx
/graphite
2/src
/moz.build
53 echo Now use hg commands to create a
patch for the mozilla tree.