-
Notifications
You must be signed in to change notification settings - Fork 0
/
cipd.bat
30 lines (24 loc) · 969 Bytes
/
cipd.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
@echo off
:: Copyright (c) 2016 The Chromium Authors. All rights reserved.
:: Use of this source code is governed by a BSD-style license that can be
:: found in the LICENSE file.
setlocal
:: To allow this powershell script to run if it was a byproduct of downloading
:: and unzipping the depot_tools.zip distribution, we clear the Zone.Identifier
:: alternate data stream. This is equivalent to clicking the "Unblock" button
:: in the file's properties dialog.
set errorlevel=
if not exist "%~dp0.cipd_client.exe" (
echo.>%~dp0cipd.ps1:Zone.Identifier
powershell -NoProfile -ExecutionPolicy RemoteSigned -Command "%~dp0cipd.ps1" < nul
if not errorlevel 0 goto :END
)
for /f %%i in (%~dp0cipd_client_version) do set CIPD_CLIENT_VER=%%i
"%~dp0.cipd_client.exe" selfupdate -version "%CIPD_CLIENT_VER%"
if not errorlevel 0 goto :END
"%~dp0.cipd_client.exe" %*
:END
endlocal & (
set ERRORLEVEL=%ERRORLEVEL%
)
exit /b %ERRORLEVEL%