Bug 1513969 - Add telemetry to track the active time usage of the grid highlighter...
[gecko.git] / media / update-libjpeg.sh
blobfed64dcff383af4b44b3d347749d182f079de89d
1 #!/bin/sh
3 set -v -e -x
5 if [ $# -lt 1 ]; then
6 echo "Usage: update-libjpeg.sh /path/to/libjpeg-turbo/ [tag]"
7 exit 1
8 fi
10 srcdir=`realpath $(dirname $0)`
11 topsrcdir=${srcdir}/..
12 rm -rf $srcdir/libjpeg
14 repo=$1
15 tag=${2-HEAD}
17 (cd $repo; git archive --prefix=media/libjpeg/ $tag) | (cd $srcdir/..; tar xf -)
19 cd $srcdir/libjpeg
20 cp win/jsimdcfg.inc simd/
22 revert_files="1050342.diff assembly-tables.diff externalize-table.diff jconfig.h jconfigint.h jpeg_nbits_table.c moz.build MOZCHANGES mozilla.diff simd/jsimdcfg.inc"
23 if test -d ${topsrcdir}/.hg; then
24 hg revert --no-backup $revert_files
25 elif test -d ${topsrcdir}/.git; then
26 git checkout HEAD -- $revert_files
29 patch -p0 -i mozilla.diff
30 patch -p0 -i 1050342.diff
31 patch -p3 -i externalize-table.diff
32 patch -p3 -i assembly-tables.diff