Update git submodules
[LibreOffice.git] / bin / get_config_variables
blob7cc1e9325db4c25d3b73632a8719eea23c1600e0
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