update.sh (569B)
1 #!/bin/bash 2 # Use this script to update the copy of google test. 3 # This won't commit any changes, so build and test afterwards. 4 5 set -e 6 7 if [ $# -lt 1 ]; then 8 echo "Usage: $0 <tag/commit>" 1>&2 9 exit 2 10 fi 11 12 cd "$(dirname "$0")" 13 d=$(mktemp -d) 14 trap 'rm -rf "$d"' EXIT 15 ../../fuzz/config/git-copy.sh https://github.com/google/googletest \ 16 "$1" "$d"/googletest 17 rm -rf gtest 18 mv "$d"/googletest/googletest gtest 19 mv "$d"/googletest/CONTRIBUTORS gtest/CONTRIBUTORS 20 mv "$d"/googletest/LICENSE gtest/LICENSE 21 echo "$1" > VERSION 22 cat "$d"/googletest/.git-copy >> VERSION