forked from baidu/CUP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
diff.sh
36 lines (31 loc) · 1.84 KB
/
diff.sh
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
#!/bin/bash
# ##########################################################################
# Author: Guannan @mythmgn
# Brief:
# a. Diff changes between github repo and baidu internal repo
# b. Commit changes of a to heading repo.
# Arguments:
# None
#
# Returns:
# succ: 0
# fail: not 0
# ##########################################################################
diff_opts=" -c "
bidu_cup_dir="./cup/"
github_dir="../../../open-source/python/cup_on_github/"
exclude_diffs="cup_thirdp .git bidu diff.sh gendoc.sh"
cmds="find ${bidu_cup_dir} -type f"
for ex in ${exclude_diffs}
do
cmds="${cmds}|grep -v ${ex}"
done
lines=`eval ${cmds}`
for line in ${lines}
do
diff ${diff_opts} ${line} ${github_dir}${line}
if [[ $? -ne 0 ]];then
# echo "---${line} vs ${github_dir}${line}--"
echo "----------------------------------------------------------------"
fi
done