diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 14:29:10 +0000 |
commit | 2aa4a82499d4becd2284cdb482213d541b8804dd (patch) | |
tree | b80bf8bf13c3766139fbacc530efd0dd9d54394c /modules/fdlibm/update.sh | |
parent | Initial commit. (diff) | |
download | firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.tar.xz firefox-2aa4a82499d4becd2284cdb482213d541b8804dd.zip |
Adding upstream version 86.0.1.upstream/86.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | modules/fdlibm/update.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/modules/fdlibm/update.sh b/modules/fdlibm/update.sh new file mode 100755 index 0000000000..90d4178626 --- /dev/null +++ b/modules/fdlibm/update.sh @@ -0,0 +1,40 @@ +#!/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"])' +} +get_date() { + curl -s "${API_BASE_URL}/commits/${COMMIT}" \ + | python -c 'import json, sys; print(json.loads(sys.stdin.read())["commit"]["committer"]["date"])' +} + +mv ./src/moz.build ./src_moz.build +rm -rf src +if [ "$#" -eq 0 ]; then + COMMIT=$(get_commit) +else + COMMIT="$1" +fi +sh ./import.sh "${COMMIT}" +mv ./src_moz.build ./src/moz.build +COMMITDATE=$(get_date) +for FILE in $(ls patches/*.patch | sort); do + echo "Applying ${FILE} ..." + patch -p3 --no-backup-if-mismatch < ${FILE} +done +hg add src + +perl -p -i -e "s/\[commit [0-9a-f]{40} \(.{1,100}\)\]/[commit ${COMMIT} (${COMMITDATE})]/" README.mozilla + +echo "###" +echo "### Updated fdlibm/src to ${COMMIT}." +echo "### Remember to verify and commit the changes to source control!" +echo "###" |