]>
Commit | Line | Data |
---|---|---|
a4b75251 TL |
1 | #!/usr/bin/env bash |
2 | # SPDX-License-Identifier: BSD-3-Clause | |
3 | # Copyright 2016-2020, Intel Corporation | |
4 | ||
5 | # | |
6 | # prepare-for-build.sh - is called inside a Docker container; prepares | |
7 | # the environment inside a Docker container for | |
8 | # running build of PMDK project. | |
9 | # | |
10 | ||
11 | set -e | |
12 | ||
13 | # This should be run only on CIs | |
14 | if [ "$CI_RUN" == "YES" ]; then | |
15 | # Make sure $WORKDIR has correct access rights | |
16 | # - set them to the current UID and GID | |
17 | echo $USERPASS | sudo -S chown -R $(id -u).$(id -g) $WORKDIR | |
18 | fi | |
19 | ||
20 | # Configure tests (e.g. ssh for remote tests) unless the current configuration | |
21 | # should be preserved | |
22 | KEEP_TEST_CONFIG=${KEEP_TEST_CONFIG:-0} | |
23 | if [[ "$KEEP_TEST_CONFIG" == 0 ]]; then | |
24 | ./configure-tests.sh | |
25 | fi |