summaryrefslogtreecommitdiff
path: root/config_host.mk.source
blob: efd014dbb333ab2feb59790fcbcbbe2ee19a53e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
# 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`
sed -n -e 's/^\s*\(export [A-Z0-9_]*=\)\(.*\)$/\1"\2"/p' \
    -e 's/^\s*export\s\+\([A-Z0-9_]*\)?=\(.*\)$/export \1="${\1:-\2}"/p' config_host.mk >$temp_conf
source ./$temp_conf
rm $temp_conf