diff --git a/bin/idea.sh b/bin/idea.sh
index 398d2aa2343..db477a6f17c 100644
--- a/bin/idea.sh
+++ b/bin/idea.sh
@@ -113,21 +113,14 @@ if [ "x$SPEC" = "x" ] ; then
echo "FATAL: SPEC is empty" >&2; exit 1
fi
-
-addSourceFolder() {
- root=$@
- relativePath="`echo "$root" | sed -e s@"$TOP/\(.*$\)"@"\1"@`"
- folder="`echo "$SOURCE_FOLDER" | sed -e s@"\(.*/\)####\(.*\)"@"\1$relativePath\2"@`"
- printf "%s\n" "$folder" >> $IDEA_JDK
-}
-
### Replace template variables
NUM_REPLACEMENTS=0
replace_template_file() {
for i in $(seq 1 $NUM_REPLACEMENTS); do
- eval "sed -i \"s|\${FROM${i}}|\${TO${i}}|g\" $1"
+ eval "sed \"s|\${FROM${i}}|\${TO${i}}|g\" $1 > $1.tmp"
+ mv $1.tmp $1
done
}
@@ -154,7 +147,7 @@ SOURCE_PREFIX=""
for root in $MODULE_ROOTS; do
- SOURCES=$SOURCES"\n$SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
+ SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
done
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
diff --git a/make/langtools/intellij/template/runConfigurations/javac.xml b/make/langtools/intellij/template/runConfigurations/javac.xml
index 2e3768e36d5..eae93223583 100644
--- a/make/langtools/intellij/template/runConfigurations/javac.xml
+++ b/make/langtools/intellij/template/runConfigurations/javac.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/make/langtools/intellij/template/runConfigurations/javadoc.xml b/make/langtools/intellij/template/runConfigurations/javadoc.xml
index 4ca7b731c40..5c28b78d4f3 100644
--- a/make/langtools/intellij/template/runConfigurations/javadoc.xml
+++ b/make/langtools/intellij/template/runConfigurations/javadoc.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/make/langtools/intellij/template/runConfigurations/javap.xml b/make/langtools/intellij/template/runConfigurations/javap.xml
index b509698f609..3dcf3e4d18a 100644
--- a/make/langtools/intellij/template/runConfigurations/javap.xml
+++ b/make/langtools/intellij/template/runConfigurations/javap.xml
@@ -16,7 +16,7 @@
-
+
diff --git a/make/langtools/intellij/template/runConfigurations/jshell.xml b/make/langtools/intellij/template/runConfigurations/jshell.xml
index 051b02f354a..06c2fd21ced 100644
--- a/make/langtools/intellij/template/runConfigurations/jshell.xml
+++ b/make/langtools/intellij/template/runConfigurations/jshell.xml
@@ -14,7 +14,7 @@
-
+
diff --git a/make/langtools/intellij/template/runConfigurations/sjavac.xml b/make/langtools/intellij/template/runConfigurations/sjavac.xml
index de499f6708b..1e613df3deb 100644
--- a/make/langtools/intellij/template/runConfigurations/sjavac.xml
+++ b/make/langtools/intellij/template/runConfigurations/sjavac.xml
@@ -16,7 +16,7 @@
-
+