Index: update_depot_tools.bat |
diff --git a/update_depot_tools.bat b/update_depot_tools.bat |
index f880d9b895a384c616915c6d1f4ce5bc7c063319..340c0147831415df6a4f773ff9d61b845024027f 100644 |
--- a/update_depot_tools.bat |
+++ b/update_depot_tools.bat |
@@ -7,6 +7,15 @@ |
setlocal |
+:: Windows sometimes freaks out if a file is overwritten while it's being |
iannucci
2013/03/20 21:06:14
'sometimes'?
szager1
2013/03/20 21:19:10
I haven't explored every nuance of this behavior (
iannucci
2013/03/20 21:33:14
I was meaning that the 'sometimes' can just be omi
M-A Ruel
2013/03/20 21:51:22
Exact, cmd.exe keeps a byte offset and re-reads th
szager1
2013/03/20 21:53:52
OK, I removed 'sometimes'. Why give false hope?
|
+:: executed. Copy this script off to a temporary location and reinvoke from |
+:: there before running any svn or git commands. |
+IF %~nx0==update_depot_tools.bat ( |
+ COPY /Y %~dp0update_depot_tools.bat %~dp0update_depot_tools_tmp.bat >nul |
iannucci
2013/03/20 21:06:14
is %~dp guaranteed to end with a r'\' ?
M-A Ruel
2013/03/20 21:06:37
Please use %TEMP%\update_depot_tools_%RANDOM%.bat,
szager1
2013/03/20 21:19:10
That means that I have to fix every occurence of %
M-A Ruel
2013/03/20 21:51:22
I don't mind about not using random but you should
szager1
2013/03/20 21:53:52
Hmmm... I've never seen it any other way.
szager1
2013/03/20 21:53:52
Hmmm... I've never seen it any other way. Theoret
szager1
2013/03/20 22:03:44
Done.
|
+ if errorlevel 1 goto :EOF |
+ %~dp0update_depot_tools_tmp.bat %* |
iannucci
2013/03/20 21:06:14
Should we goto :EOF after this? I forget how batch
szager1
2013/03/20 21:19:10
Empirical evidence suggests that it's not necessar
M-A Ruel
2013/03/20 21:51:22
No it's not necessary. As long as there is not 'ca
|
+) |
+ |
set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git |
:: Will download svn and python. |