modules/xz-embedded/update.sh
author Bill McCloskey <billm@mozilla.com>
Wed, 31 May 2017 16:23:18 -0700
changeset 412329 41073f956bfb54c7d5d9d6d483e26896b8806c30
parent 361285 5f09af81e038124846b887684128e83c65a273da
permissions -rwxr-xr-x
Bug 1371117 - Convert NS_GetCurrentThread usage in PBackground (r=bevis) MozReview-Commit-ID: 1DHvWR8P3Oo

#!/bin/sh

# Script to update the Mozilla in-tree copy of XZ Embedded.

MY_TEMP_DIR=$(mktemp -d -t xz-embedded_update.XXXXXX) || exit 1

git clone http://git.tukaani.org/xz-embedded.git ${MY_TEMP_DIR}/xz-embedded

COMMIT=$(git -C ${MY_TEMP_DIR}/xz-embedded rev-parse HEAD)
cd $(dirname $0)
perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[${COMMIT}]/" README.mozilla;

rm -rf src
mkdir src
mv ${MY_TEMP_DIR}/xz-embedded/userspace/xz_config.h src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/include/linux/xz.h src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_private.h src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_lzma2.h src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_stream.h src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_crc32.c src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_crc64.c src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_dec_bcj.c src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_dec_stream.c src/
mv ${MY_TEMP_DIR}/xz-embedded/linux/lib/xz/xz_dec_lzma2.c src/
rm -rf ${MY_TEMP_DIR}
hg addremove src

echo "###"
echo "### Updated xz-embedded/src to $COMMIT."
echo "### Remember to verify and commit the changes to source control!"
echo "###"