I am using MSYS and have a file vars.txt with variable, value keys like:
WINDIR C:/WINDOWS STS_BUILD_DIRECTORY D:/STS/TMP ALLUSERSPROFILE C:/Documents and Settings/All Users
I want to read this in and set environment variables up. I have a bash script setenv:
while read var value; do echo "performing export $var=$value" export $var='$value' done
and I call it with
cat vars.txt | source setenv
However in my environment the variables are not set. I also tried making it into a function but no joy. Anybody here know what I'm doign wrong? Thanks.