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