Bug 1523562 [wpt PR 14930] - Sync Mozilla CSS tests as of 2019-01-17, a=testonly
[gecko.git] / gfx / graphite2 / moz-gr-update.sh
blobb91d9c161cc71e89024dad9fd87e358a147d3593
1 #!/bin/bash
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 # Run as
10 # ./gfx/graphite2/moz-gr-update.sh RELEASE
12 # where RELEASE is the graphite2 release to be used, e.g. "1.3.4".
14 RELEASE=$1
16 if [ "x$RELEASE" == "x" ]
17 then
18 echo "Must provide the version number to be used."
19 exit 1
22 TARBALL="https://github.com/silnrsi/graphite/releases/download/$RELEASE/graphite2-minimal-$RELEASE.tgz"
24 foo=`basename $0`
25 TMPFILE=`mktemp -t ${foo}.XXX` || exit 1
27 curl -L "$TARBALL" -o "$TMPFILE"
28 tar -x -z -C gfx/graphite2/ --strip-components 1 -f "$TMPFILE" || exit 1
29 rm "$TMPFILE"
31 echo "This directory contains the Graphite2 library release $RELEASE from" > gfx/graphite2/README.mozilla
32 echo "$TARBALL" >> gfx/graphite2/README.mozilla
33 echo ""
34 echo "See" $0 "for update procedure." >> gfx/graphite2/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:
43 echo
45 hg stat gfx/graphite2
47 echo
48 echo If gfx/graphite2/src/files.mk has changed, please make corresponding
49 echo changes to gfx/graphite2/src/moz.build
50 echo
52 echo
53 echo Now use hg commands to create a patch for the mozilla tree.
54 echo