:: portable cygwin setup setlocal enabledelayedexpansion set path=%path%;%CD%\cygwin\bin set HOME=/home/awearn set DISPLAY=localhost:0.0 rem set CYGWIN=tty set SHELL=/bin/bash (tasklist | find /i "xwin" echo %errorlevel% if [!errorlevel!]==[0] goto :start_term) %CD%\cygwin\bin\umount -c %CD%\cygwin\bin\umount -A %CD%\cygwin\bin\mount -fub "%CD%/cygwin/bin" "/usr/bin" %CD%\cygwin\bin\mount -fub "%CD%/cygwin/lib" "/usr/lib" %CD%\cygwin\bin\mount -fub "%TEMP%" "/tmp" %CD%\cygwin\bin\mount -fub "%CD%/cygwin" "/" if [%1]==[bash_only] start "cygwin" mintty -e bash --login -i tasklist | findstr /i /C:screen.exe if not errorlevel 1 start "cygwin" mintty -e bash --login -i -c "screen -x -U -h 10000 -aA" & goto :eof start "cygwin" mintty -e bash --login -i -c "screen -U -h 10000 -aA -D -RR" endlocal