-
Notifications
You must be signed in to change notification settings - Fork 0
/
find-changed-files.sh
59 lines (55 loc) · 1.56 KB
/
find-changed-files.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/bin/bash
for i in "$@"; do
case $i in
-r=*|--repo1=*)
repo1="${i#*=}"
eval repo1=$repo1
shift # past argument=value
;;
-b=*|--branch1=*)
branch1="${i#*=}"
shift # past argument=value
;;
-s=*|--start1=*)
start1="${i#*=}"
shift # past argument=value
;;
-e=*|--end1=*)
end1="${i#*=}"
shift # past argument=value
;;
-f=*|--repo2=*)
repo2="${i#*=}"
eval repo2=$repo2
shift # past argument=value
;;
-d=*|--branch2=*)
branch2="${i#*=}"
shift # past argument=value
;;
-o=*|--start2=*)
start2="${i#*=}"
shift # past argument=value
;;
-z=*|--end2=*)
end2="${i#*=}"
shift # past argument=value
;;
--default)
projects_dir=.
shift # past argument with no value
;;
*)
# unknown option
;;
esac
done
comm -12 \
<(./show-changed-files.sh --path="$repo1" \
--branch_name="$branch1" \
--start_commit="$start1" \
--end_commit="$end1") \
<(./show-changed-files.sh --path="$repo2" \
--branch_name="$branch2" \
--start_commit="$start2" \
--end_commit="$end2")