tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

update_default_config.sh (2084B)


      1 #!/bin/bash
      2 
      3 function show_error_msg()
      4 {
      5  echo "*** ERROR *** $? line $1 $0 did not complete successfully!"
      6  echo "$ERROR_HELP"
      7 }
      8 ERROR_HELP=""
      9 
     10 # Print an Error message if `set -eE` causes the script to exit due to a failed command
     11 trap 'show_error_msg $LINENO' ERR
     12 
     13 DEFAULT_CONFIG_PATH=dom/media/webrtc/third_party_build/default_config_env
     14 
     15 # use the previous default_config_env to make sure any locally overriden
     16 # settings don't interfere with the update process.
     17 MOZ_CONFIG_PATH=$DEFAULT_CONFIG_PATH source dom/media/webrtc/third_party_build/use_config_env.sh
     18 # build the "NEXT_MILESTONE" using the previous next milestone, which
     19 # will become the current milestone after updating the default config
     20 # file.
     21 NEXT_MILESTONE=$(($MOZ_NEXT_LIBWEBRTC_MILESTONE+1))
     22 
     23 if [ "x" = "x$NEW_BUG_NUMBER" ]; then
     24  echo ""
     25  echo "NEW_BUG_NUMBER is not defined.  Please use the bug number created for"
     26  echo "updating the libwebrtc library to version $NEXT_MILESTONE."
     27  echo "For more information about creating this bug, see the first step of the"
     28  echo "prerequisites section of our wiki:"
     29  echo "https://wiki.mozilla.org/Media/WebRTC/libwebrtc_Update_Process#Prerequisites"
     30  echo ""
     31  echo "  NEW_BUG_NUMBER={v$NEXT_MILESTONE-bug-number} bash $0"
     32  echo ""
     33  exit
     34 fi
     35 
     36 if [ "x$MOZ_NEXT_LIBWEBRTC_MILESTONE" = "x" ]; then
     37  echo "MOZ_NEXT_LIBWEBRTC_MILESTONE is not defined, see README.md"
     38  exit
     39 fi
     40 
     41 if [ "x$MOZ_NEXT_FIREFOX_REL_TARGET" = "x" ]; then
     42  echo "MOZ_NEXT_FIREFOX_REL_TARGET is not defined, see README.md"
     43  exit
     44 fi
     45 
     46 
     47 # After this point:
     48 # * eE: All commands should succeed.
     49 # * u: All variables should be defined before use.
     50 # * o pipefail: All stages of all pipes should succeed.
     51 set -eEuo pipefail
     52 
     53 
     54 MOZCONFIG=dom/media/webrtc/third_party_build/default_mozconfig \
     55  ./mach python $SCRIPT_DIR/write_default_config.py \
     56  --script-path $SCRIPT_DIR \
     57  --prior-bug-number $MOZ_FASTFORWARD_BUG \
     58  --bug-number $NEW_BUG_NUMBER \
     59  --milestone $MOZ_NEXT_LIBWEBRTC_MILESTONE \
     60  --release-target $MOZ_NEXT_FIREFOX_REL_TARGET \
     61  --output-path $SCRIPT_DIR/default_config_env