nss: makefile bitrot: no need for android spcial case anymore
[LibreOffice.git] / bin / get_config_variables
blobaa8198a44f4f172fce3ce3f496ffe1b3fde966b8
1 #!/bin/sh
2 #set -x
4 glv_var="$1"
5 glv_config="config_host.mk"
7 if [ "$glv_var" = "--build" ] ; then
8 glv_config="config_build.mk"
9 shift
10 elif [ "$glv_var" = "--host" ] ; then
11 shift
14 # full path, in case we export a "wrong" PATH
15 test -n "$GREP" && glv_grep="$GREP" || glv_grep=$(command -v grep)
16 test -n "$SED" && glv_sed="$SED" || glv_sed=$(command -v sed)
18 while [ -n "$1" ] ; do
19 glv_var="$1"
20 shift
21 glv_value=$("${glv_grep}" "^ *export ${glv_var}=" ${glv_config} | "${glv_sed}" -e 's/[^=]*=//')
22 export ${glv_var}="${glv_value}"
23 done
25 unset glv_var
26 unset glv_value
27 unset glv_config
28 unset glv_sed
29 unset glv_grep