Skip to content

Commit e6508e7

Browse files
committed
Rebuild dotc if new *.scala files are found in dotty/src
1 parent 2bfbb8e commit e6508e7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

bin/dotc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,15 @@ function checkjar {
5757
else
5858
echo "The required jar file was built successfully."
5959
fi
60+
else
61+
NEW_FILES="$(find "$DOTTY_ROOT/src" -iname "*.scala" -newer "$1")"
62+
if [ ! -z "$NEW_FILES" ];
63+
then
64+
echo "new files detected. rebuilding"
65+
cd $DOTTY_ROOT
66+
sbt $2
67+
cd -
68+
fi
6069
fi
6170
}
6271

0 commit comments

Comments
 (0)