1#!/bin/sh 2 3set -xe 4 5# If a branch name is passed on the command line then sync 6# to that instead of HEAD. 7branch="$1" 8 9old_revision=$(cat BORINGSSL_REVISION) 10rm -Rf src 11git clone https://boringssl.googlesource.com/boringssl src 12cd src 13if [ "$branch" ]; then 14 git checkout "$branch" 15fi 16new_revision=$(git show -s --pretty=%H) 17if [ "$branch" ]; then 18 target="branch $branch" 19else 20 target="$new_revision" 21fi 22msgfile=$(mktemp) 23 24echo "external/boringssl: Sync to ${target}. 25 26This includes the following changes: 27 28https://boringssl.googlesource.com/boringssl/+log/${old_revision}..${new_revision} 29" > $msgfile 30 31# Just pull out commit titles and any Update-Note paragraphs for AOSP commit summary 32git log --format='format:* %s%n%n%b' ${old_revision}..${new_revision} \ 33 | awk -v RS='' -v ORS='\n' '/^Update-Note/ {print} /^\*/ {print}' \ 34 >> $msgfile 35 36 37cd .. 38echo " 39Test: treehugger" >> $msgfile 40if [ ! "$branch" ]; then 41 echo ${new_revision} > BORINGSSL_REVISION 42fi 43 44rm -Rf src/.git 45rm -Rf src/fuzz 46# Omit the experimental new certificate verifier library for now. 47rm -Rf src/pki 48rm -Rf src/third_party/googletest 49rm -Rf apple-aarch64 apple-arm apple-x86 apple-x86_64 ios-aarch64 ios-arm \ 50 linux-aarch64 linux-arm linux-ppc64le linux-x86 linux-x86_64 win-aarch64 win-x86 win-x86_64 51 52python3 src/util/generate_build_files.py android android-cmake bazel cmake eureka 53cp src/LICENSE NOTICE 54 55git add . 56git commit --no-verify -F $msgfile 57rm -f $msgfile 58