diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /modules/fdlibm/update.sh | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'modules/fdlibm/update.sh')
-rw-r--r-- | modules/fdlibm/update.sh | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/modules/fdlibm/update.sh b/modules/fdlibm/update.sh new file mode 100644 index 000000000..3413b6b78 --- /dev/null +++ b/modules/fdlibm/update.sh @@ -0,0 +1,35 @@ +#!/bin/sh + +# Script to update the mozilla in-tree copy of the fdlibm library. +# Run this within the /modules/fdlibm directory of the source tree. + +set -e + +API_BASE_URL=https://api.github.com/repos/freebsd/freebsd + +get_commit() { + curl -s "${API_BASE_URL}/commits?path=lib/msun/src&per_page=1" \ + | python -c 'import json, sys; print(json.loads(sys.stdin.read())[0]["sha"])' +} + +mv ./src/moz.build ./src_moz.build +rm -rf src +BEFORE_COMMIT=$(get_commit) +sh ./import.sh +mv ./src_moz.build ./src/moz.build +COMMIT=$(get_commit) +if [ ${BEFORE_COMMIT} != ${COMMIT} ]; then + echo "Latest commit is changed during import. Please run again." + exit 1 +fi +for FILE in $(ls patches/*.patch | sort); do + patch -p3 < ${FILE} +done +hg add src + +perl -p -i -e "s/\[commit [0-9a-f]{40}\]/[commit ${COMMIT}]/" README.mozilla + +echo "###" +echo "### Updated fdlibm/src to ${COMMIT}." +echo "### Remember to verify and commit the changes to source control!" +echo "###" |