Here I means when running bash or other shell in non-interactive mode,
how can I set up environment variables, and without touch the Win32
System Environment?
Default PATH, for example. When PATH variable isn't set, there is a
default PATH. But if you set the PATH variable, the default PATH is
gone, and then you must add the x:\cygwin\bin to the PATH manually.
C:\Profiles\Shecti>path
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;c:\cygwin\bin
C:\Profiles\Shecti>bash -c "echo $PATH"
/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS:/mnt/c/WINDOWS/System32/Wbem:/usr/bin
C:\Profiles\Shecti>set PATH=
C:\Profiles\Shecti>c:\cygwin\bin\bash -c "echo $PATH"
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
Well, it seems just fine, but NO, THERE IS A BIG PROBLEM, because
not everyone have a clean OS, some of them have already installed a
cygwin, but in different versions. I found that cygwin-1.7 is very
suitable to deploy, because cygwin-1.7 supports fstab, so you don't have
to trick with the Win32 Registry any more, you just config the
etc/fstab, different cygwins will have their different mount points and
won't bother each other at all. But if I must include a specific
version of cygwin\bin in the PATH, then this co-existence is break.
--
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/