-
Notifications
You must be signed in to change notification settings - Fork 0
/
sync_settings.sh
executable file
·63 lines (53 loc) · 1.52 KB
/
sync_settings.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/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 2.0
# which accompanies this distribution, and is available at
# https://www.eclipse.org/legal/epl-2.0/
#
# SPDX-License-Identifier: EPL-2.0
#
# 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="tmf/org.eclipse.tracecompass.tmf.core"
TEST_REFERENCE="tmf/org.eclipse.tracecompass.tmf.core.tests"
RUNTIME_FILES=$RUNTIME_REFERENCE/.settings/*.prefs
TEST_FILES=$TEST_REFERENCE/.settings/*.prefs
# Runtime plugins
for DIR in */*.core */*.ui doc/org.eclipse.tracecompass.examples
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 */*.alltests
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