Skip to content

Commit 6735820

Browse files
Fix file change detection in dotc & dotr scripts
`>&` redirects both stdout and stderr, here we *need* `stdout` for the test below but don't care about `stderr`: when `dist-bootstrapped/target/pack/VERSION` doesn't exists, users don't should't see the error from find. Also testing for the existance of `$target` to rebuild dotty is obviously a typo, we want to rebuild `$version` is not on disk.
1 parent 068f42d commit 6735820

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/common

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ shift # Mutates $@ by deleting the first element ($1)
1313
version="$ROOT/dist-bootstrapped/target/pack/VERSION"
1414

1515
# Create the target if absent or if file changed in ROOT/compiler
16-
new_files="$(find "$ROOT/compiler" \( -iname "*.scala" -o -iname "*.java" \) -newer "$version" >& /dev/null)"
16+
new_files="$(find "$ROOT/compiler" \( -iname "*.scala" -o -iname "*.java" \) -newer "$version" 2> /dev/null)"
1717

18-
if [ ! -f "$target" ] || [ ! -z "$new_files" ]; then
18+
if [ ! -f "$version" ] || [ ! -z "$new_files" ]; then
1919
echo "Building Dotty..."
2020
sbt "dist-bootstrapped/pack"
2121
fi

0 commit comments

Comments
 (0)