File: sync_settings.sh

package info (click to toggle)
eclipse-tracecompass 6.2.0%2Brepack-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 77,440 kB
  • sloc: java: 316,465; xml: 99,829; perl: 400; sh: 353; makefile: 43; javascript: 29; python: 18
file content (63 lines) | stat: -rwxr-xr-x 1,565 bytes parent folder | download
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 */*.branding 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