Commit | Line | Data |
---|---|---|
51557ecc MAL |
1 | #!/bin/bash |
2 | ############################################################################### | |
3 | # Copyright (c) 2016 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 | ||
11 | # A simple script that sets the rcp to use the stable update site. This is | |
12 | # meant to be used when the master branch is being branched into a stable | |
13 | # branch. | |
14 | ||
ccefec92 | 15 | PATH_TO_PRODUCT_FILE="../../rcp/org.eclipse.tracecompass.rcp.product/tracing.product" |
51557ecc MAL |
16 | |
17 | OUTPUT=$(cat $PATH_TO_PRODUCT_FILE | grep "<repository.*stable.*") | |
18 | if [[ -z "$OUTPUT" ]]; | |
19 | then | |
20 | sed -i -E s/\(\<repository.*\)master\(.*$\)/\\1stable\\2/g $PATH_TO_PRODUCT_FILE | |
21 | CHECK_OUTPUT=$(cat $PATH_TO_PRODUCT_FILE | grep "<repository.*stable.*") | |
22 | if [[ -z "$CHECK_OUTPUT" ]]; | |
23 | then | |
24 | echo "Failed!" | |
25 | else | |
26 | echo "Success!" | |
27 | fi | |
28 | else | |
29 | echo "Stable update site already set?" | |
30 | fi | |
31 |