2012-11-06 22:11:58 +04:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Script used to update the Graphite2 library in the mozilla source tree
|
|
|
|
|
|
|
|
# This script lives in gfx/graphite2, along with the library source,
|
|
|
|
# but must be run from the top level of the mozilla-central tree.
|
|
|
|
|
2015-11-04 10:07:15 +03:00
|
|
|
# Run as
|
|
|
|
#
|
|
|
|
# ./gfx/graphite2/moz-gr-update.sh RELEASE
|
|
|
|
#
|
|
|
|
# where RELEASE is the graphite2 release to be used, e.g. "1.3.4".
|
2012-11-06 22:11:58 +04:00
|
|
|
|
2015-11-04 10:07:15 +03:00
|
|
|
RELEASE=$1
|
2012-11-06 22:11:58 +04:00
|
|
|
|
2015-11-04 10:07:15 +03:00
|
|
|
if [ "x$RELEASE" == "x" ]
|
|
|
|
then
|
|
|
|
echo "Must provide the version number to be used."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-03-15 10:53:04 +03:00
|
|
|
TARBALL="https://github.com/silnrsi/graphite/releases/download/$RELEASE/graphite2-minimal-$RELEASE.tgz"
|
2015-11-04 10:07:15 +03:00
|
|
|
|
|
|
|
foo=`basename $0`
|
2018-08-21 16:58:42 +03:00
|
|
|
TMPFILE=`mktemp -t ${foo}.XXX` || exit 1
|
2015-11-04 10:07:15 +03:00
|
|
|
|
|
|
|
curl -L "$TARBALL" -o "$TMPFILE"
|
|
|
|
tar -x -z -C gfx/graphite2/ --strip-components 1 -f "$TMPFILE" || exit 1
|
|
|
|
rm "$TMPFILE"
|
|
|
|
|
|
|
|
echo "This directory contains the Graphite2 library release $RELEASE from" > gfx/graphite2/README.mozilla
|
|
|
|
echo "$TARBALL" >> gfx/graphite2/README.mozilla
|
|
|
|
echo ""
|
|
|
|
echo "See" $0 "for update procedure." >> gfx/graphite2/README.mozilla
|
2012-11-06 22:11:58 +04:00
|
|
|
|
|
|
|
# fix up includes because of bug 721839 (cstdio) and bug 803066 (Windows.h)
|
2015-11-04 10:07:15 +03:00
|
|
|
#find gfx/graphite2/ -name "*.cpp" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
|
|
|
|
#find gfx/graphite2/ -name "*.h" -exec perl -p -i -e "s/<cstdio>/<stdio.h>/;s/Windows.h/windows.h/;" {} \;
|
2012-11-06 22:11:58 +04:00
|
|
|
|
|
|
|
# summarize what's been touched
|
2015-11-04 10:07:15 +03:00
|
|
|
echo Updated to $RELEASE.
|
2012-11-06 22:11:58 +04:00
|
|
|
echo Here is what changed in the gfx/graphite2 directory:
|
|
|
|
echo
|
|
|
|
|
|
|
|
hg stat gfx/graphite2
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
echo
|
|
|
|
echo If gfx/graphite2/src/files.mk has changed, please make corresponding
|
|
|
|
echo changes to gfx/graphite2/src/moz.build
|
|
|
|
echo
|
|
|
|
|
2012-11-06 22:11:58 +04:00
|
|
|
echo
|
|
|
|
echo Now use hg commands to create a patch for the mozilla tree.
|
|
|
|
echo
|