8375649: idea.sh script adds source paths in a single, enormous, line to jdk.iml

Reviewed-by: erikj, liach
This commit is contained in:
David Beaumont 2026-04-15 09:22:34 +00:00
parent 23a08ee81e
commit d114e8d058

View File

@ -187,14 +187,18 @@ fi
SOURCE_PREFIX="<sourceFolder url=\"file://"
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
# SOURCES is a single string containing embeded newlines.
for root in $MODULE_ROOTS; do
if [ "x$CYGPATH" != "x" ]; then
root=`$CYGPATH -am $root`
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
root=`wslpath -am $root`
fi
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
# Add line termination/indentation for everything after the first entry.
if [ "x$SOURCES" != "x" ]; then
SOURCES="${SOURCES}\n "
fi
SOURCES="${SOURCES}${SOURCE_PREFIX}${root}${SOURCE_POSTFIX}"
done
add_replacement "###SOURCE_ROOTS###" "$SOURCES"