aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-27 22:55:23 +0200
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-05-27 23:03:51 +0200
commite6508e7a5351a74c91b6de46ea241d4c526e92b3 (patch)
treee7a139d1d26cde995c0f9ece2eccebdd7b62f505 /bin
parent2bfbb8ecd20954841069efda4950d833fb3bfcee (diff)
downloaddotty-e6508e7a5351a74c91b6de46ea241d4c526e92b3.tar.gz
dotty-e6508e7a5351a74c91b6de46ea241d4c526e92b3.tar.bz2
dotty-e6508e7a5351a74c91b6de46ea241d4c526e92b3.zip
Rebuild dotc if new *.scala files are found in `dotty/src`
Diffstat (limited to 'bin')
-rwxr-xr-xbin/dotc9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/dotc b/bin/dotc
index 1aadfbc55..088ae14ff 100755
--- a/bin/dotc
+++ b/bin/dotc
@@ -57,6 +57,15 @@ function checkjar {
else
echo "The required jar file was built successfully."
fi
+ else
+ NEW_FILES="$(find "$DOTTY_ROOT/src" -iname "*.scala" -newer "$1")"
+ if [ ! -z "$NEW_FILES" ];
+ then
+ echo "new files detected. rebuilding"
+ cd $DOTTY_ROOT
+ sbt $2
+ cd -
+ fi
fi
}