Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / tools / build / win / map_drive.bat
blobc415d1ee237ac033fc7634ee85f9b37068647c55
1 @echo off
3 set SHARE_NAME=\\chrome-dev\chrome
4 set DRIVE_LETTER=%1
5 set PATH=%SystemRoot%;%SystemRoot%\system32
7 net use %DRIVE_LETTER%
8 if errorlevel 1 goto DRIVE_NOT_MAPPED
10 net use %DRIVE_LETTER% | find "%SHARE_NAME%" > nul
11 if not errorlevel 1 goto DRIVE_ALREADY_MAPPED
13 :WRONG_DRIVE_MAPPED
14 echo %DRIVE_LETTER% Drive mapped to wrong share, disconnecting..
15 net use %DRIVE_LETTER% /DELETE
16 goto MAPDRIVE
18 :DRIVE_ALREADY_MAPPED
19 echo %DRIVE_LETTER% Drive already mapped..
20 goto END
22 :DRIVE_NOT_MAPPED
23 echo %DRIVE_LETTER% Drive not mapped..
24 goto MAPDRIVE
26 :MAPDRIVE
27 echo Mapping %DRIVE_LETTER% to %SHARE_NAME%
28 net use %DRIVE_LETTER% %SHARE_NAME%
30 :END