aboutsummaryrefslogtreecommitdiff
path: root/bin/common
diff options
context:
space:
mode:
authorOlivier Blanvillain <olivier.blanvillain@gmail.com>2017-02-10 14:38:54 +0100
committerOlivier Blanvillain <olivier.blanvillain@gmail.com>2017-02-10 15:03:34 +0100
commitec1011a8d8861f7b4aefe9439288cb8b90b6c4bc (patch)
treefc4af7041ea8476535a8aa99d25a86517094c474 /bin/common
parentc568fbda0659e74daa4394c4f92071ec52a06b58 (diff)
downloaddotty-ec1011a8d8861f7b4aefe9439288cb8b90b6c4bc.tar.gz
dotty-ec1011a8d8861f7b4aefe9439288cb8b90b6c4bc.tar.bz2
dotty-ec1011a8d8861f7b4aefe9439288cb8b90b6c4bc.zip
Fix dotr/dotc to handle corrupted .packages
Diffstat (limited to 'bin/common')
-rwxr-xr-xbin/common3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/common b/bin/common
index 5b1dd177f..0a084c8a6 100755
--- a/bin/common
+++ b/bin/common
@@ -122,7 +122,8 @@ function check_jar {
# Usage:
# check_jar "name" "path/to/package.jar" "sources/dir" 'lambda to exec on failure'
local new_files="$(find "$DOTTY_ROOT/$3" \( -iname "*.scala" -o -iname "*.java" \) -newer "$2")"
- if [ ! -z "$new_files" ]; then
+ # If the find failed, or if it found new files...
+ if [ "$?" -ne 0 ] || [ ! -z "$new_files" ]; then
printf "New files detected in $1, rebuilding..."
rm "$2"
eval "$4"