Fixes issue restarting on Linux

On Linux when the updater runs it does so by restarting
the ide via a while loop in the bash script. However the
bash script is not run again. This has two problems:
  . If we update the bash script itself, these changes are
    not picked up. And this includes for example changing
    the selector directory.
  . VM options files and other config data is not read again
    so if we change them as part of the update, they will not
    be picked up.

This change fixes both issues by re-launching the script
if the IDE requests a restart.

https://android-review.googlesource.com/#/c/137800/2
This commit is contained in:
Esteban de la Canal
2015-03-13 21:03:28 +01:00
committed by Roman Shevchenko
parent 681adc85d6
commit e9254bf8d6
+15 -16
View File
@@ -165,19 +165,18 @@ fi
# ---------------------------------------------------------------------
# Run the IDE.
# ---------------------------------------------------------------------
while true ; do
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \
$AGENT \
"-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" \
-classpath "$CLASSPATH" \
$VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" \
"-XX:ErrorFile=$HOME/java_error_in_@@product_uc@@_%p.log" \
-Djb.restart.code=88 -Didea.paths.selector=@@system_selector@@ \
$IDE_PROPERTIES_PROPERTY \
$IDE_JVM_ARGS \
$REQUIRED_JVM_ARGS \
$MAIN_CLASS_NAME \
"$@"
EC=$?
test $EC -ne 88 && exit $EC
done
LD_LIBRARY_PATH="$IDE_BIN_HOME:$LD_LIBRARY_PATH" "$JDK/bin/java" \
$AGENT \
"-Xbootclasspath/a:$IDE_HOME/lib/boot.jar" \
-classpath "$CLASSPATH" \
$VM_OPTIONS "-Djb.vmOptionsFile=$VM_OPTIONS_FILES_USED" \
"-XX:ErrorFile=$HOME/java_error_in_@@product_uc@@_%p.log" \
-Djb.restart.code=88 -Didea.paths.selector=@@system_selector@@ \
$IDE_PROPERTIES_PROPERTY \
$IDE_JVM_ARGS \
$REQUIRED_JVM_ARGS \
$MAIN_CLASS_NAME \
"$@"
EC=$?
test $EC -ne 88 && exit $EC
exec "$0" "$@"