8210318: idea.sh script doesn't work on Mac
Remove usage non-portable sed options Reviewed-by: erikj, ihse
This commit is contained in:
parent
0d9f615e92
commit
66288b8c6c
13
bin/idea.sh
13
bin/idea.sh
@ -113,21 +113,14 @@ if [ "x$SPEC" = "x" ] ; then
|
|||||||
echo "FATAL: SPEC is empty" >&2; exit 1
|
echo "FATAL: SPEC is empty" >&2; exit 1
|
||||||
fi
|
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
|
### Replace template variables
|
||||||
|
|
||||||
NUM_REPLACEMENTS=0
|
NUM_REPLACEMENTS=0
|
||||||
|
|
||||||
replace_template_file() {
|
replace_template_file() {
|
||||||
for i in $(seq 1 $NUM_REPLACEMENTS); do
|
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
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +147,7 @@ SOURCE_PREFIX="<sourceFolder url=\"file://"
|
|||||||
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
||||||
|
|
||||||
for root in $MODULE_ROOTS; do
|
for root in $MODULE_ROOTS; do
|
||||||
SOURCES=$SOURCES"\n$SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
|
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
|
||||||
done
|
done
|
||||||
|
|
||||||
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
|
add_replacement "###SOURCE_ROOTS###" "$SOURCES"
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<ConfigurationWrapper RunnerId="Run" />
|
<ConfigurationWrapper RunnerId="Run" />
|
||||||
<method>
|
<method>
|
||||||
<option name="Make" enabled="false" />
|
<option name="Make" enabled="false" />
|
||||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
|
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" target="build-all-classes" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<ConfigurationWrapper RunnerId="Run" />
|
<ConfigurationWrapper RunnerId="Run" />
|
||||||
<method>
|
<method>
|
||||||
<option name="Make" enabled="false" />
|
<option name="Make" enabled="false" />
|
||||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
|
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" target="build-all-classes" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<ConfigurationWrapper RunnerId="Run" />
|
<ConfigurationWrapper RunnerId="Run" />
|
||||||
<method>
|
<method>
|
||||||
<option name="Make" enabled="false" />
|
<option name="Make" enabled="false" />
|
||||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
|
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" target="build-all-classes" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
<envs />
|
<envs />
|
||||||
<method>
|
<method>
|
||||||
<option name="Make" enabled="false" />
|
<option name="Make" enabled="false" />
|
||||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
|
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" target="build-all-classes" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<ConfigurationWrapper RunnerId="Run" />
|
<ConfigurationWrapper RunnerId="Run" />
|
||||||
<method>
|
<method>
|
||||||
<option name="Make" enabled="false" />
|
<option name="Make" enabled="false" />
|
||||||
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/.idea/build.xml" target="build-all-classes" />
|
<option name="AntTarget" enabled="true" antfile="file://$PROJECT_DIR$/make/langtools/intellij/build.xml" target="build-all-classes" />
|
||||||
</method>
|
</method>
|
||||||
</configuration>
|
</configuration>
|
||||||
</component>
|
</component>
|
||||||
|
Loading…
Reference in New Issue
Block a user