This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Source a .bat file from bash


Is there a way to source a .bat file from bash and have the paths and other environment variables set in it apply in cygwin?

For example

$ echo $PATH
/usr/local/bin:/usr/bin

$ cat file.bat
set path=%path%;C:\windows\something
set x=somevar

$ some_command file.bat

$ echo $PATH
/usr/local/bin:/usr/bin:/cygdrive/c/windows/something   <- Expected

$ echo $x
somevar   <- Expected

Is this possible?

Thanks,
saurabh 		 	   		  
--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]