office-gobmx/bin/get_config_variables
Norbert Thiebaud 288a3e6ef7 add a way to extract variables from config_host/build and shell-export them
usage:
. ./bin/get_config_variables [ --host | --build ] variable [variable ...]

--host is the default

Change-Id: I37d90faf613dfbdb060c18e25370175fde26f3bf
2012-11-14 04:00:50 -06:00

23 lines
415 B
Bash

#!/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_vonfig