Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | ############################################################################### |
| 3 | # Copyright (c) 2014 Ericsson |
| 4 | # |
| 5 | # All rights reserved. This program and the accompanying materials |
Patrick Tasse | c918c0f | 2020-02-21 15:15:11 -0500 | [diff] [blame] | 6 | # are made available under the terms of the Eclipse Public License 2.0 |
Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 7 | # which accompanies this distribution, and is available at |
Patrick Tasse | c918c0f | 2020-02-21 15:15:11 -0500 | [diff] [blame] | 8 | # https://www.eclipse.org/legal/epl-2.0/ |
| 9 | # |
| 10 | # SPDX-License-Identifier: EPL-2.0 |
Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 11 | # |
| 12 | # Contributors: |
| 13 | # Alexandre Montplaisir - Initial API and implementation |
| 14 | ############################################################################### |
| 15 | |
| 16 | # Synchronize the project settings for all plugins |
| 17 | # (by copying the contents of tmf.core's settings) |
| 18 | |
| 19 | # Plugins from which we will copy the settings |
Alexandre Montplaisir | 10a2301 | 2015-06-15 17:51:03 -0400 | [diff] [blame] | 20 | RUNTIME_REFERENCE="tmf/org.eclipse.tracecompass.tmf.core" |
| 21 | TEST_REFERENCE="tmf/org.eclipse.tracecompass.tmf.core.tests" |
Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 22 | |
| 23 | RUNTIME_FILES=$RUNTIME_REFERENCE/.settings/*.prefs |
| 24 | TEST_FILES=$TEST_REFERENCE/.settings/*.prefs |
| 25 | |
| 26 | # Runtime plugins |
Patrick Tasse | f1ab1d0 | 2020-07-30 10:53:17 -0400 | [diff] [blame] | 27 | for DIR in */*.core */*.ui */*.branding doc/org.eclipse.tracecompass.examples |
Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 28 | do |
| 29 | # Skip non-directories |
| 30 | if [ ! -d $DIR ]; then |
| 31 | continue |
| 32 | fi |
| 33 | |
| 34 | # Don't copy over the same files |
| 35 | if [ "$DIR" == "$RUNTIME_REFERENCE" ]; then |
| 36 | continue |
| 37 | fi |
| 38 | |
| 39 | for FILE in $RUNTIME_FILES |
| 40 | do |
| 41 | cp $FILE "$DIR/.settings/" |
| 42 | done |
| 43 | done |
| 44 | |
| 45 | |
| 46 | # Test plugins |
Alexandre Montplaisir | 10a2301 | 2015-06-15 17:51:03 -0400 | [diff] [blame] | 47 | for DIR in */*.tests */*.alltests |
Alexandre Montplaisir | 569a23b | 2014-04-15 16:59:01 -0400 | [diff] [blame] | 48 | do |
| 49 | # Skip non-directories |
| 50 | if [ ! -d $DIR ]; then |
| 51 | continue |
| 52 | fi |
| 53 | |
| 54 | # Don't copy over the same files |
| 55 | if [ "$DIR" == "$TEST_REFERENCE" ]; then |
| 56 | continue |
| 57 | fi |
| 58 | |
| 59 | for FILE in $TEST_FILES |
| 60 | do |
| 61 | cp $FILE "$DIR/.settings/" |
| 62 | done |
| 63 | done |