forked from loosethisskin/android_external_clang
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathgen_diff.sh
More file actions
executable file
·58 lines (48 loc) · 1.09 KB
/
gen_diff.sh
File metadata and controls
executable file
·58 lines (48 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
#
# Copyright 2011 Google Inc. All Rights Reserved.
function usage() {
echo Usage: $0 "[PATH_TO_YOUR_LLVM_DIRECTORY]"
echo This will generate a diff of both Clang and LLVM in the files
echo diff_clang.txt
echo diff_llvm.txt
}
BASE_LLVM_DIR_ONCE=0
BASE_LLVM_DIR=$LLVMDIR/llvm
ARGS=`getopt -o h --long help -- "$@"`
eval set -- "$ARGS"
while true; do
case "$1" in
-h|--help)
usage
exit 0
;;
--)
shift;
break
;;
*)
echo "Internal error!"
exit 1
;;
esac
done
for ARG; do
if [ $BASE_LLVM_DIR_ONCE -eq 1 ]; then
usage
exit 1
fi
BASE_LLVM_DIR_ONCE=1
BASE_LLVM_DIR=$ARG
done
BASE_CLANG_DIR=$BASE_LLVM_DIR/tools/clang
echo "Using BASE_LLVM_DIR = $BASE_LLVM_DIR"
echo "Using BASE_CLANG_DIR = $BASE_CLANG_DIR"
ANDROID_LLVM_DIR=$PWD/../llvm
ANDROID_CLANG_DIR=$PWD
echo "Using ANDROID_LLVM_DIR = $ANDROID_LLVM_DIR"
echo "Using ANDROID_CLANG_DIR = $ANDROID_CLANG_DIR"
DIFF_FLAGS="-x .git -r"
diff $DIFF_FLAGS $BASE_CLANG_DIR $ANDROID_CLANG_DIR > diff_clang.txt
diff $DIFF_FLAGS $BASE_LLVM_DIR $ANDROID_LLVM_DIR > diff_llvm.txt
exit 0