Files
libreoffice/config_host.mk.source
Peter Foley 638adb6373 fix sourcing config_host.mk
Change-Id: I0ef147e1a86a7a88359c30c458e69cc5ac35741c
2012-10-25 20:34:45 -04:00

12 lines
363 B
Plaintext

# 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