tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

update-libjpeg.sh (580B)


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