summaryrefslogtreecommitdiffstats
path: root/bin/get_config_variables
blob: 60a2bdc0478887b0a4b5e1614ac2ff57e43b3ea8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
#set -x

glv_var="$1"
glv_config="config_host.mk"

if [ "$glv_var" = "--build" ] ; then
    glv_config="config_build.mk"
    shift
elif [ "$glv_var" = "--host" ] ; then
    shift
fi

while [ -n "$1" ] ; do
    glv_var="$1"
    shift
    glv_value=$(grep "^ *export ${glv_var}=" ${glv_config} | sed -e "s/[^=]*=//")
    export ${glv_var}="${glv_value}"
done

unset glv_var
unset glv_value
unset glv_config