"Scott Wegner" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
... However, I'd rather find a solution where the batch script can remain
"unaware" of its Cygwin context. Once I get things working, I plan on
creating bash script wrappers for many Windows batch scripts, so I'd like
to make the changes in the Cygwin environment, rather than editing each
batch script individually.
What I do is have a batch file I call before executing any dos commands
(sort of a ".dosrc"), and in that I set my dos path. So for example I have a
bash function "dos" that looks like this:
function dos() { local s=/c; if [ "$1" == "" ]; then s=/k; fi; cmd $s
"%ETC%\login &" $*; }
... where %ETC%\login.bat is my ".dosrc" file. This enables me to say to
bash, "dos" and get a dos prompt, or "dos foo" and execute foo in a dos
context. LIkewise for things such as shortcuts to cmd.exe, I use "cmd.exe /k
%ETC%\login".
I know this is not exactly what you're looking to do but perhaps something
similar might work in your case.
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/