Tox: Run pylint also for GPL
[csit.git] / resources / libraries / bash / entry / install_nginx.sh
1 #!/usr/bin/env bash
2
3 # Copyright (c) 2021 Intel 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 # Install the NGINX framework on the DUT node. Check prerequisites.
17
18 set -exuo pipefail
19
20 # Assumptions:
21 # + There is a directory holding CSIT code to use (this script is there).
22 # + At least one of the following is true:
23 # ++ JOB_NAME environment variable is set,
24 # ++ or this entry script has access to arguments.
25 # Consequences (and specific assumptions) are multiple,
26 # examine tree of functions for current description.
27
28 BASH_ENTRY_DIR="$(dirname $(readlink -e "${BASH_SOURCE[0]}"))"
29 BASH_FUNCTION_DIR="$(readlink -e "${BASH_ENTRY_DIR}/../function")"
30 source "${BASH_FUNCTION_DIR}/common.sh" || {
31   echo "Source failed." >&2
32   exit 1
33 }
34 source "${BASH_FUNCTION_DIR}/nginx.sh" || die "Source failed."
35 common_dirs ${@} || die
36 gather_nginx  || die "Download nginx failed."
37 nginx_extract || die "Extract nginx failed."
38 nginx_compile || die "Compile nginx failed."