rcp: Script to enable automatic updates at start for stable releases
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 22 Aug 2016 04:54:11 +0000 (00:54 -0400)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 23 Aug 2016 04:27:07 +0000 (00:27 -0400)
Bug: 499247
Change-Id: I45a05fc6f459fcd2456af67804dde4b3698259e3
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/79409
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
releng/set_automatic_updates.sh [new file with mode: 0755]

diff --git a/releng/set_automatic_updates.sh b/releng/set_automatic_updates.sh
new file mode 100755 (executable)
index 0000000..748315d
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2016 Ericsson
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+###############################################################################
+
+# A simple script that sets the rcp to automatically update at startup by
+# default. This sets the preference through plugin_customization.ini
+# See https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247
+
+PATH_TO_PREFERENCE_FILE="../rcp/org.eclipse.tracecompass.rcp.branding/plugin_customization.ini"
+
+OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE  | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled)
+if [[ -z "$OUTPUT" ]];
+then
+       echo "Setting Automatic update"
+       echo "
+# check for updates every time Trace Compass starts. This should only be done in stable releases.
+# https://bugs.eclipse.org/bugs/show_bug.cgi?id=499247
+org.eclipse.equinox.p2.ui.sdk.scheduler/enabled=true" >> $PATH_TO_PREFERENCE_FILE
+       CHECK_OUTPUT=$(cat $PATH_TO_PREFERENCE_FILE | grep org.eclipse.equinox.p2.ui.sdk.scheduler | grep enabled)
+       if [[ -z "$CHECK_OUTPUT" ]];
+       then
+               echo "Failed!"
+       else
+               echo "Success!"
+       fi
+else
+       echo "Automatic update already set?"
+fi
+
This page took 0.024647 seconds and 5 git commands to generate.