@echo off rem Cygwin installation script rem rem This script sets up the mount table for a Cygwin installation under rem .\cygwin. Existing mounts are backed up to %TEMP%\cygwin-mounts. If rem this file exists, it is not overwritten. To force this script to run, rem remove any existing cygwin-mounts file. rem rem All mounts are user mounts, which override system mounts. rem rem To undo the installation, run uninstall.bat. Uninstalling should return rem all Cygwin mounts to their previous settings. However, this script does rem not back up the previous setting for the cygdrive path. set WD=%~dp0 set CYGWIN_ROOT=%WD%\cygwin set CYGWIN_BIN=%CYGWIN_ROOT%\bin rem If cygwin-mounts exists, installation has already been run if not exist %TEMP%\cygwin-mounts ( rem Back up Cygwin mounts to file %CYGWIN_BIN%\mount -m > %TEMP%\cygwin-mounts rem Remove all user mounts %CYGWIN_BIN%\umount -A rem Mount standard Cygwin directories (binary, force, user) %CYGWIN_BIN%\mount -b -f -u %CYGWIN_ROOT% / %CYGWIN_BIN%\mount -b -f -u %CYGWIN_ROOT%\bin /usr/bin %CYGWIN_BIN%\mount -b -f -u %CYGWIN_ROOT%\lib /usr/lib rem Use user temp directory as /tmp %CYGWIN_BIN%\mount -b -f -u %TEMP% /tmp rem Use %WD% as home/user %CYGWIN_BIN%\mount -b -f -u %WD% /home/user rem Change the cygdrive path %CYGWIN_BIN%\mount -b -u -c "/cygdrive" )