blob: 93d07748e5786c2d51e9aabaf577d51e6ec69c0e [file] [log] [blame]
#!/bin/bash
set -x
val=$(repo sync . | echo $?)
if [ $val != 0 ]; then
echo could not repo sync local directory, bailing.
fi
rm -rf /tmp/robo
mkdir -p /tmp/robo || true
pushd /tmp/robo
git clone -b google --single-branch https://github.com/robolectric/robolectric.git
#git checkout google
popd
echo building patch
# waiting on clean up the ttf/icu data -- hence nativeruntime resources are ignored.
diff -Naur . /tmp/robo/robolectric \
-x '*.bp' \
-x '*.md' \
-x '*.sh' \
-x 'METADATA' \
-x 'MODULE_LICENSE_MIT' \
-x 'NOTICE' \
-x 'OWNERS' \
-x 'soong*' \
-x '.git*' \
-x 'buildSrc' \
-x 'gradle' \
-x '*.gradle' \
-x 'sdks.txt' \
-x '*.ttf' \
-x '*.utf' \
-x '*.otf' \
-x '*.ttc' \
-x 'fonts.xml' \
-x '*.dat' \
> /tmp/robo/patch
echo applying patch
patch -p1 < /tmp/robo/patch
echo patch applied