I\'m trying to safely update the home directory as specified in /etc/passwd
,
but the standard Linux utils - usermod and vipw - for doing so aren\'t provided
by
I like to keep my cygwin installation sync'd to a pen drive and another computer, so I hate hard-coding the home directory. I use the following cygwin.bat:
echo off
SETLOCAL
set SHELL=\\bin\\bash
set HOME=%~dp0..\..\doc\unix
bin\bash --login -i
ENDLOCAL
SETLOCAL and ENDLOCAL make sure that SHELL and HOME don't clobber existing env variables for other programs. HOME=%~dp0..\..\doc\unix
sets HOME to be two directories up, in the doc/unix subdirectory. Then in ....\doc\unix.bashrc, I include PATH="/bin:/usr/local/bin:/usr/X11R6/bin:/usr/bin"
.
I did not use start /wait %CD%\bin\bash
to start bash, because I am using Console2, so I don't need an additional cmd window.