diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-14 04:00:26 -0600 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-11-14 04:00:50 -0600 |
commit | 288a3e6ef7e04c95be1ed26a5df850fbf4e6ea24 (patch) | |
tree | 4f7aa771b0a9e0adee8aa3fdeeec83ae0f30b14f /bin | |
parent | allow hiding of rtl or ltr buttons on toolbars when ctl selected fdo#33356 (diff) | |
download | core-288a3e6ef7e04c95be1ed26a5df850fbf4e6ea24.tar.gz core-288a3e6ef7e04c95be1ed26a5df850fbf4e6ea24.zip |
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
Diffstat (limited to 'bin')
-rw-r--r-- | bin/get_config_variables | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/bin/get_config_variables b/bin/get_config_variables new file mode 100644 index 000000000000..43a3ad1d2ab0 --- /dev/null +++ b/bin/get_config_variables @@ -0,0 +1,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_vonfig |