CSIT: Make script inclusion more readable
[ci-management.git] / jjb / scripts / csit / nsh_sfc-functional-virl.sh
1 #!/bin/bash
2
3 # Copyright (c) 2020 Cisco and/or its affiliates.
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at:
7 #
8 #     http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15
16 set -xeu -o pipefail
17
18 # execute nsh_sfc bootstrap script if it exists
19 if [ -e bootstrap-nsh_sfc-functional-virl.sh ]
20 then
21     # make sure that bootstrap-nsh_sfc-functional-virl.sh is executable
22     chmod +x bootstrap-nsh_sfc-functional-virl.sh
23     # run the script
24     if [ ${STREAM} == 'master' ]; then
25         ./bootstrap-nsh_sfc-functional-virl.sh ${STREAM} ${OS}
26     else
27         ./bootstrap-nsh_sfc-functional-virl.sh 'stable.'${STREAM} ${OS}
28     fi
29 else
30     echo 'ERROR: No bootstrap-nsh_sfc-functional-virl.sh found'
31     exit 1
32 fi
33
34 # vim: ts=4 ts=4 sts=4 et :