Ivan Lozano | d4c94da | 2020-11-16 10:56:18 -0500 | [diff] [blame] | 1 | #!/bin/bash -ex |
2 | |||||
3 | # Usage: | ||||
4 | # | ||||
5 | # ./update-libfuzzer $commit_hash | ||||
6 | # | ||||
7 | # Where `$commit_hash` is a commit hash from | ||||
8 | # https://github.com/llvm-mirror/llvm-project | ||||
9 | |||||
10 | set -ex | ||||
11 | |||||
12 | cd "$(dirname $0)" | ||||
13 | project_dir="$(pwd)" | ||||
14 | |||||
15 | tmp_dir="$(mktemp -d)" | ||||
16 | |||||
17 | git clone https://github.com/llvm/llvm-project.git "$tmp_dir" | ||||
18 | cd "$tmp_dir" | ||||
19 | git checkout "$1" | ||||
20 | rm -rf "$project_dir/libfuzzer/" | ||||
21 | mv "$tmp_dir/compiler-rt/lib/fuzzer/" "$project_dir/libfuzzer/" |