lttng: Add script to copy the project settings from tmf.core
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 15 Apr 2014 20:59:01 +0000 (16:59 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 22 Apr 2014 22:36:41 +0000 (18:36 -0400)
This will help keep consistent project setttings across plugins.

Change-Id: I20ebb8efdecf0c93d02cdb0f192fca387173b3b4
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/25092
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
sync_settings.sh [new file with mode: 0755]

diff --git a/sync_settings.sh b/sync_settings.sh
new file mode 100755 (executable)
index 0000000..eac923f
--- /dev/null
@@ -0,0 +1,61 @@
+#!/bin/bash
+###############################################################################
+# Copyright (c) 2014 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
+#
+# Contributors:
+#     Alexandre Montplaisir - Initial API and implementation
+###############################################################################
+
+# Synchronize the project settings for all plugins
+# (by copying the contents of tmf.core's settings)
+
+# Plugins from which we will copy the settings
+RUNTIME_REFERENCE="org.eclipse.linuxtools.tmf.core"
+TEST_REFERENCE="org.eclipse.linuxtools.tmf.core.tests"
+
+RUNTIME_FILES=$RUNTIME_REFERENCE/.settings/*.prefs
+TEST_FILES=$TEST_REFERENCE/.settings/*.prefs
+
+# Runtime plugins
+for DIR in *.core *.ui
+do
+  # Skip non-directories
+  if [ ! -d $DIR ]; then
+    continue
+  fi
+
+  # Don't copy over the same files
+  if [ "$DIR" == "$RUNTIME_REFERENCE" ]; then
+    continue
+  fi
+
+  for FILE in $RUNTIME_FILES
+  do
+    cp $FILE "$DIR/.settings/"
+  done
+done
+
+
+# Test plugins
+for DIR in *.tests
+do
+  # Skip non-directories
+  if [ ! -d $DIR ]; then
+    continue
+  fi
+
+  # Don't copy over the same files
+  if [ "$DIR" == "$TEST_REFERENCE" ]; then
+    continue
+  fi
+
+  for FILE in $TEST_FILES
+  do
+    cp $FILE "$DIR/.settings/"
+  done
+done
This page took 0.025771 seconds and 5 git commands to generate.