Last active
April 6, 2022 09:20
-
-
Save ben-clayton/2d05be21fc28d3a2f192463d466678d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
WD=$(pwd)/merge-tint-dawn | |
TINT=$WD/tint | |
DAWN=$WD/dawn | |
MERGE=$WD/merge | |
if [ ! -d $TINT ]; then | |
git clone https://dawn.googlesource.com/tint "$TINT" | |
git -C "$TINT" checkout 66d6668372d9fde5e09e25ba48632b15ed3d8cd2 | |
fi | |
if [ ! -d $DAWN ]; then | |
git clone https://dawn.googlesource.com/dawn "$DAWN" | |
git -C "$DAWN" checkout b5c5df50ab385e52dbae22ee6b5761780291bed9 | |
fi | |
rm -fr "$MERGE" | |
rsync -r "$TINT/" "$MERGE" --exclude '.git' --exclude '.gitignore' | |
rsync -r "$DAWN/" "$MERGE" | |
git -C "$MERGE" config core.safecrlf false # silence 'warning: CRLF will be replaced by LF' warning | |
git -C "$MERGE" add . | |
git -C "$MERGE" commit -m "overlay merge base" > /dev/null | |
echo | |
echo "> View diff summary? [y/n]" | |
read INPUT | |
if [[ $INPUT =~ ^[Yy]$ ]]; then | |
git -C "$MERGE" diff HEAD origin/tint-merge --ignore-space-at-eol --compact-summary | |
fi | |
echo | |
echo "> View changed and added files? [y/n]" | |
read INPUT | |
if [[ $INPUT =~ ^[Yy]$ ]]; then | |
git -C "$MERGE" diff HEAD origin/tint-merge --ignore-space-at-eol --diff-filter=d | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment