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