add_target_cpu_patches.sh (1240B)
1 #!/bin/bash 2 3 # After this point: 4 # * eE: All commands should succeed. 5 # * u: All variables should be defined before use. 6 # * o pipefail: All stages of all pipes should succeed. 7 set -eEuo pipefail 8 9 FILES=`ack -lw current_cpu | sort \ 10 | grep -v "BUILDCONFIG\.gn" \ 11 | grep -v "v8_target_cpu\.gni"` 12 13 echo $" 14 Bug 1775143 - pt14 - (mirror) 58f47eacaf10 r=ng 15 16 Search third_party/libwebrtc/build for current_cpu, removing 17 third_party/libwebrtc/build/config/BUILDCONFIG.gn 18 and 19 third_party/libwebrtc/build/config/v8_target_cpu.gni from the list. 20 21 ack -lw current_cpu third_party/libwebrtc/build | grep -v \"BUILDCONFIG\.gn\" | grep -v \"v8_target_cpu\.gni\" 22 23 That gave me this:" > $TMP_DIR/commit_msg.txt 24 25 for FILE in $FILES; do 26 sed -i'.bak' 's/current_cpu/target_cpu/g' $FILE 27 echo "sed -i 's/current_cpu/target_cpu/g' third_party/libwebrtc/build/$FILE" >> $TMP_DIR/commit_msg.txt 28 find . -name "*.bak" | xargs rm 29 done 30 31 echo $" 32 33 (skip-generation) 34 35 Depends on D149827 36 37 Differential Revision: https://phabricator.services.mozilla.com/D149828 38 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/ec13234e5a641a026e946425ddea2d0de86435cd 39 40 " >> $TMP_DIR/commit_msg.txt 41 42 git commit -F $TMP_DIR/commit_msg.txt -a