forked from rizinorg/rizin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
travis-extract-var.sh
34 lines (31 loc) · 919 Bytes
/
travis-extract-var.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
#
# SPDX-FileCopyrightText: 2021 ret2libc <[email protected]>
# SPDX-License-Identifier: LGPL-3.0-only
print_var()
{
VAR_NAME=$1
VAR_VALUE=$2
if [ "${VAR_VALUE}" != "" ] ; then
printf "export %s=%q\n" "${VAR_NAME}" "${VAR_VALUE}"
fi
}
env -0 | while IFS='=' read -r -d '' n v; do
if [[ "${n}" =~ ^TRAVIS* || "${n}" =~ ^RZ* || "${n}" =~ SAN_* || "%{n}" =~ CODECOV_* || "%{n}" =~ VCS_* || "%{n}" =~ CI_* ]]; then
print_var "${n}" "${v}"
fi
done
# print extra variables
print_var DEBPKG "${DEBPKG}"
print_var CC "${CC}"
print_var CXX "${CXX}"
print_var CFLAGS "${CFLAGS}"
print_var LDFLAGS "${LDFLAGS}"
print_var CXXFLAGS "${CXXFLAGS}"
print_var TRAVIS "${TRAVIS}"
print_var INSTALL_SYSTEM "${INSTALL_SYSTEM}"
print_var MESON_OPTIONS "${MESON_OPTIONS}"
print_var COVERAGE "${COVERAGE}"
print_var ASAN "${ASAN}"
print_var SHIPPABLE "${SHIPPABLE}"
print_var CI "${CI}"