Skip to content

Commit 4e45ff2

Browse files
committed
Rebuild dotc if new *.scala files are found in dotty/src
1 parent 5b99d74 commit 4e45ff2

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
@@ -58,6 +58,15 @@ function checkjar {
5858
else
5959
echo "The required jar file was built successfully."
6060
fi
61+
else
62+
NEW_FILES="$(find "$DOTTY_ROOT/src" -iname "*.scala" -newer "$1")"
63+
if [ ! -z "$NEW_FILES" ];
64+
then
65+
echo "new files detected. rebuilding"
66+
cd $DOTTY_ROOT
67+
sbt $2
68+
cd -
69+
fi
6170
fi
6271
}
6372

0 commit comments

Comments
 (0)