blob: 6a1b377becea8b84f7909df3388a2c2deccddfb6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
set -v -e -x
if [ $# -lt 1 ]; then
echo "Usage: update-libjpeg.sh /path/to/libjpeg-turbo/ [tag]"
exit 1
fi
srcdir=`realpath $(dirname $0)`
topsrcdir=${srcdir}/..
rm -rf $srcdir/libjpeg
repo=$1
tag=${2-HEAD}
(cd $repo; git archive --prefix=media/libjpeg/ $tag) | (cd $srcdir/..; tar xf -)
cd $srcdir/libjpeg
revert_files="jconfig.h jconfigint.h moz.build MOZCHANGES mozilla.diff"
if test -d ${topsrcdir}/.hg; then
hg revert --no-backup $revert_files
elif test -e ${topsrcdir}/.git; then
git checkout HEAD -- $revert_files
fi
patch -p0 -i mozilla.diff
|