2 # SPDX-License-Identifier: EPL-1.0
3 ##############################################################################
4 # Copyright (c) 2017 The Linux Foundation and others.
6 # All rights reserved. This program and the accompanying materials
7 # are made available under the terms of the Eclipse Public License v1.0
8 # which accompanies this distribution, and is available at
9 # http://www.eclipse.org/legal/epl-v10.html
11 ##############################################################################
13 # List of files exclude
14 declare -a excludes=("releng-defaults.yaml"
22 echo "Usage: $(basename $0) options (-n [next release]) (-c [current release]) (-p [previous release]) -h for help";
26 if ( ! getopts ":n:c:p:h" opt ); then
30 while getopts ":n:c:p:h" opt; do
42 echo "Invalid option: -$OPTARG" >&2
49 echo "Option -$OPTARG requires an argument." >&2
55 echo "Start Branch Cutting:"
57 while IFS="" read -r y; do
59 for f in "${excludes[@]}"; do
60 if [[ $y =~ $f && $found -eq 0 ]]; then
65 if [[ $found -eq 1 ]]; then
66 echo "Ignore file $y found in excludes list"
68 ./branch_cut.awk -v new_reltag="$new_reltag" -v curr_reltag="$curr_reltag" -v prev_reltag="$prev_reltag" "$y" > "$TEMP"
69 [[ ! -s "$TEMP" ]] && echo "$y: excluded"
70 [[ -s "$TEMP" ]] && mv "$TEMP" "$y" && echo "$y: Done" && let "mod++"
73 done < <(find ../../jjb -name "*.yaml")
75 echo "Modified $mod out of $count files"