modules/brotli/update.sh
author Paul Adenot <paul@paul.cx>
Tue, 09 Dec 2014 11:37:01 +0100
changeset 231823 542c432f2c3b253075d60a13577bbe8c1abdcf4c
parent 208814 3f412cb1d5ce40901c064449149adfb143ded7b3
permissions -rwxr-xr-x
Bug 1108455 - Part 2. r=jesup, a=sledru

#!/bin/sh

# Script to update the mozilla in-tree copy of the Brotli decompressor.
# Run this within the /modules/brotli directory of the source tree.

MY_TEMP_DIR=`mktemp -d -t brotli_update` || exit 1

git clone https://code.google.com/p/font-compression-reference/ ${MY_TEMP_DIR}

COMMIT=`(cd ${MY_TEMP_DIR} && git log | head -n 1)`
perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[${COMMIT}]/" README.mozilla;

rm -rf dec
mv ${MY_TEMP_DIR}/brotli/dec dec
rm -rf ${MY_TEMP_DIR}
hg add dec

echo '###'
echo '### Updated brotli/dec to $COMMIT.'
echo '### Remember to verify and commit the changes to source control!'
echo '###'