2012-06-11 11:20:23 -05:00
|
|
|
# this script allows to correctly source config_host.mk into existing shell
|
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
#
|
|
|
|
# source ./config_host.mk.source
|
|
|
|
|
|
|
|
temp_conf=`mktemp config_host.mk.XXXXXX`
|
2012-07-23 09:35:01 -05:00
|
|
|
sed -e 's/^\s*\(export [A-Z0-9_]*=\)\(.*\)$/\1"\2"/' \
|
|
|
|
-e 's/^\s*export\s\+\([A-Z0-9_]*\)?=\(.*\)$/export \1="${\1:-\2}"/' config_host.mk >$temp_conf
|
2012-06-21 01:56:52 -05:00
|
|
|
source ./$temp_conf
|
2012-06-11 11:20:23 -05:00
|
|
|
rm $temp_conf
|