8294368: Java incremental builds broken on Windows after JDK-8293116

Reviewed-by: erikj, djelinski, jlahoda
This commit is contained in:
Jorn Vernee 2022-10-05 10:26:53 +00:00
parent 4bdd1c9148
commit 8ebebbce32
4 changed files with 47 additions and 8 deletions

View file

@ -352,6 +352,21 @@ function convert_path() {
fi
}
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
# and output them to the file specified by $2.
# If the output file already exists, it is overwritten.
function convert_file() {
infile="$1"
outfile="$2"
if [[ -e $outfile ]] ; then
rm $outfile
fi
while read line; do
convert_path "$line"
echo "$result" >> $outfile
done < $infile
}
# Treat $1 as name of a file containing paths. Convert those paths to Windows style,
# in a new temporary file, and return a string "@<temp file>" pointing to that
# new file.
@ -498,6 +513,8 @@ if [[ "$ACTION" == "import" ]] ; then
elif [[ "$ACTION" == "print" ]] ; then
print_command_line "$@"
echo "$result"
elif [[ "$ACTION" == "convert" ]] ; then
convert_file "$@"
elif [[ "$ACTION" == "exec" ]] ; then
exec_command_line "$@"
# Propagate exit code