blob: 24c7bd3c87d356853d19d0ec84cc5a5ff5dd03b7 [file] [log] [blame]
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -04001#!/bin/bash
2###############################################################################
3# Copyright (c) 2014 Ericsson
4#
5# All rights reserved. This program and the accompanying materials
Patrick Tassec918c0f2020-02-21 15:15:11 -05006# are made available under the terms of the Eclipse Public License 2.0
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -04007# which accompanies this distribution, and is available at
Patrick Tassec918c0f2020-02-21 15:15:11 -05008# https://www.eclipse.org/legal/epl-2.0/
9#
10# SPDX-License-Identifier: EPL-2.0
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -040011#
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 Montplaisir10a23012015-06-15 17:51:03 -040020RUNTIME_REFERENCE="tmf/org.eclipse.tracecompass.tmf.core"
21TEST_REFERENCE="tmf/org.eclipse.tracecompass.tmf.core.tests"
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -040022
23RUNTIME_FILES=$RUNTIME_REFERENCE/.settings/*.prefs
24TEST_FILES=$TEST_REFERENCE/.settings/*.prefs
25
26# Runtime plugins
Patrick Tassef1ab1d02020-07-30 10:53:17 -040027for DIR in */*.core */*.ui */*.branding doc/org.eclipse.tracecompass.examples
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -040028do
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
43done
44
45
46# Test plugins
Alexandre Montplaisir10a23012015-06-15 17:51:03 -040047for DIR in */*.tests */*.alltests
Alexandre Montplaisir569a23b2014-04-15 16:59:01 -040048do
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
63done