From 6bf0a5cb5034a7e684dcc3500e841785237ce2dd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 19:32:43 +0200 Subject: Adding upstream version 1:115.7.0. Signed-off-by: Daniel Baumann --- .../third_party_build/commit-build-file-changes.sh | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 dom/media/webrtc/third_party_build/commit-build-file-changes.sh (limited to 'dom/media/webrtc/third_party_build/commit-build-file-changes.sh') diff --git a/dom/media/webrtc/third_party_build/commit-build-file-changes.sh b/dom/media/webrtc/third_party_build/commit-build-file-changes.sh new file mode 100644 index 0000000000..2b4c791fca --- /dev/null +++ b/dom/media/webrtc/third_party_build/commit-build-file-changes.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +function show_error_msg() +{ + echo "*** ERROR *** $? line $1 $0 did not complete successfully!" + echo "$ERROR_HELP" +} +ERROR_HELP="" + +# Print an Error message if `set -eE` causes the script to exit due to a failed command +trap 'show_error_msg $LINENO' ERR + +# All commands should be printed as they are executed +# set -x + +# After this point: +# * eE: All commands should succede. +# * u: All variables should be defined before use. +# * o pipefail: All stages of all pipes should succede. +set -eEuo pipefail + +MOZ_BUILD_CHANGE_CNT=`hg status third_party/libwebrtc | wc -l | tr -d " "` +echo "MOZ_BUILD_CHANGE_CNT: $MOZ_BUILD_CHANGE_CNT" +if [ "x$MOZ_BUILD_CHANGE_CNT" != "x0" ]; then + CURRENT_COMMIT_SHA=`hg id -i | sed 's/+//'` + COMMIT_DESC=`hg --config alias.log=log log -T '{desc|firstline}' -r $CURRENT_COMMIT_SHA` + + # since we have build file changes, touch the CLOBBER file + cat CLOBBER | egrep "^#|^$" > CLOBBER.new + mv CLOBBER.new CLOBBER + echo "Modified build files in third_party/libwebrtc - $COMMIT_DESC" >> CLOBBER + + ADD_CNT=`hg status -nu third_party/libwebrtc | wc -l | tr -d " "` + DEL_CNT=`hg status -nd third_party/libwebrtc | wc -l | tr -d " "` + if [ "x$ADD_CNT" != "x0" ]; then + hg status -nu third_party/libwebrtc | xargs hg add + fi + if [ "x$DEL_CNT" != "x0" ]; then + hg status -nd third_party/libwebrtc | xargs hg rm + fi + + hg commit -m \ + "$COMMIT_DESC - moz.build file updates" \ + third_party/libwebrtc CLOBBER +fi + +echo "Done in $0" -- cgit v1.2.3