-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdiff.sh
More file actions
33 lines (29 loc) · 747 Bytes
/
diff.sh
File metadata and controls
33 lines (29 loc) · 747 Bytes
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
#! /bin/sh -e
# to be run on malibu
# Pull the latest master from malibu and malibu-advanced
# Create a new branch in malibu-advanced
# Then run the bash script: bash diff.sh <malibu-commit-sha-that-needs-to-go-to-malibu-advanced>
git log -m -1 --name-only --pretty="format:" "$1" >> files-changed.txt
ADVANCED_PATH="$(
cd ..
cd "malibu-advanced"
pwd
)"
BASE_PATH="$(
cd ..
cd "malibu"
pwd
)"
if ! brew ls --versions colordiff; then
brew install colordiff
fi
filename="files-changed.txt"
n=1
while read line; do
# reading each line
echo "==================start":$line
diff $BASE_PATH/$line $ADVANCED_PATH/$line | colordiff
echo "==================end":$line
n=$((n + 1))
done <$filename
git clean -f files-changed.txt