This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Source a .bat file from bash
- From: Saurabh T <saurabh at hotmail dot com>
- To: Cygwin <cygwin at cygwin dot com>
- Date: Fri, 9 Aug 2013 20:42:38 +0000
- Subject: 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