 Chromium Code Reviews
 Chromium Code Reviews Issue 1894803002:
  Fix git help on 32-bit Windows  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
    
  
    Issue 1894803002:
  Fix git help on 32-bit Windows  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master| OLD | NEW | 
|---|---|
| 1 @echo off | 1 @echo off | 
| 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 :: Copyright (c) 2012 The Chromium Authors. All rights reserved. | 
| 3 :: Use of this source code is governed by a BSD-style license that can be | 3 :: Use of this source code is governed by a BSD-style license that can be | 
| 4 :: found in the LICENSE file. | 4 :: found in the LICENSE file. | 
| 5 | 5 | 
| 6 :: This script will determine if python, git, or svn binaries need updates. It | 6 :: This script will determine if python, git, or svn binaries need updates. It | 
| 7 :: returns 123 if the user's shell must restart, otherwise !0 is failure | 7 :: returns 123 if the user's shell must restart, otherwise !0 is failure | 
| 8 | 8 | 
| 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly | 9 :: Sadly, we can't use SETLOCAL here otherwise it ERRORLEVEL is not correctly | 
| 10 :: returned. | 10 :: returned. | 
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 57 goto :END | 57 goto :END | 
| 58 | 58 | 
| 59 :GIT_CHECK | 59 :GIT_CHECK | 
| 60 | 60 | 
| 61 :: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or | 61 :: must explicitly use FIND_EXE to prevent this from grabbing e.g. gnuwin32 or | 
| 62 :: msys versions. | 62 :: msys versions. | 
| 63 set FIND_EXE=%SYSTEMROOT%\System32\find.exe | 63 set FIND_EXE=%SYSTEMROOT%\System32\find.exe | 
| 64 | 64 | 
| 65 :: Check to see if we're on a 32 or 64 bit system | 65 :: Check to see if we're on a 32 or 64 bit system | 
| 66 :: (parens) are necessary, otherwise batch puts an extra space after 32. | 66 :: (parens) are necessary, otherwise batch puts an extra space after 32. | 
| 67 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64) | 67 reg Query "HKLM\Hardware\Description\System\CentralProcessor\0" | %FIND_EXE% /i "x86" > NUL && (set OS_BITS=32) || (set OS_BITS=64) | 
| 
iannucci
2016/04/18 22:08:30
There's a handy variable OS_BITS here, which will
 
anatoly techtonik
2016/04/20 03:56:52
Done.
 | |
| 68 | 68 | 
| 69 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( | 69 if not exist "%WIN_TOOLS_ROOT_DIR%\.git_bleeding_edge" ( | 
| 70 set GIT_VERSION=2.7.4 | 70 set GIT_VERSION=2.7.4 | 
| 71 ) else ( | 71 ) else ( | 
| 72 set GIT_VERSION=2.8.1 | 72 set GIT_VERSION=2.8.1 | 
| 73 ) | 73 ) | 
| 74 set GIT_VERSION=%GIT_VERSION%-%OS_BITS% | 74 set GIT_VERSION=%GIT_VERSION%-%OS_BITS% | 
| 75 | 75 | 
| 76 set GIT_FETCH_URL=https://storage.googleapis.com/chrome-infra/PortableGit-%GIT_V ERSION%-bit.7z.exe | 76 set GIT_FETCH_URL=https://storage.googleapis.com/chrome-infra/PortableGit-%GIT_V ERSION%-bit.7z.exe | 
| 77 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe | 77 set GIT_DOWNLOAD_PATH=%ZIP_DIR%\git.7z.exe | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 150 :SYNC_GIT_HELP_FILES | 150 :SYNC_GIT_HELP_FILES | 
| 151 :: Copy all the depot_tools docs into the mingw64 git docs root. | 151 :: Copy all the depot_tools docs into the mingw64 git docs root. | 
| 152 :: /i : Make sure xcopy knows that the destination names a folder, not a file | 152 :: /i : Make sure xcopy knows that the destination names a folder, not a file | 
| 153 :: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message | 153 :: /q : Make xcopy quiet (though it still prints a `X File(s) copied` message | 
| 154 :: which is why we have the > NUL) | 154 :: which is why we have the > NUL) | 
| 155 :: /d : Copy source files that are newer than the corresponding destination | 155 :: /d : Copy source files that are newer than the corresponding destination | 
| 156 :: files only. This prevents excessive copying when none of the docs | 156 :: files only. This prevents excessive copying when none of the docs | 
| 157 :: actually changed. | 157 :: actually changed. | 
| 158 :: /y : Don't prompt for overwrites (yes) | 158 :: /y : Don't prompt for overwrites (yes) | 
| 159 xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\shar e\doc\git-doc" > NUL | 159 xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw64\shar e\doc\git-doc" > NUL | 
| 160 xcopy /i /q /d /y "%WIN_TOOLS_ROOT_DIR%\man\html\*" "%GIT_INST_DIR%\mingw32\shar e\doc\git-doc" > NUL | |
| 
agable
2016/04/18 16:04:37
Don't execute the statement twice, figure out whic
 
anatoly techtonik
2016/04/20 03:56:52
Done.
 | |
| 160 | 161 | 
| 161 :: MSYS users need to restart their shell. | 162 :: MSYS users need to restart their shell. | 
| 162 if defined MSYSTEM if defined DID_UPGRADE ( | 163 if defined MSYSTEM if defined DID_UPGRADE ( | 
| 163 echo. | 164 echo. | 
| 164 echo. | 165 echo. | 
| 165 echo [1;31mIMPORTANT:[0m | 166 echo [1;31mIMPORTANT:[0m | 
| 166 echo depot_tools' git distribution has been updated while inside of a MinGW | 167 echo depot_tools' git distribution has been updated while inside of a MinGW | 
| 167 echo shell. In order to complete the upgrade, please exit the shell and re-run | 168 echo shell. In order to complete the upgrade, please exit the shell and re-run | 
| 168 echo `git bash` from cmd. | 169 echo `git bash` from cmd. | 
| 169 exit 123 | 170 exit 123 | 
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 215 goto :END | 216 goto :END | 
| 216 | 217 | 
| 217 | 218 | 
| 218 :returncode | 219 :returncode | 
| 219 set WIN_TOOLS_ROOT_URL= | 220 set WIN_TOOLS_ROOT_URL= | 
| 220 set WIN_TOOLS_ROOT_DIR= | 221 set WIN_TOOLS_ROOT_DIR= | 
| 221 exit /b %ERRORLEVEL% | 222 exit /b %ERRORLEVEL% | 
| 222 | 223 | 
| 223 :END | 224 :END | 
| 224 call :returncode %ERRORLEVEL% | 225 call :returncode %ERRORLEVEL% | 
| OLD | NEW |