OLD | NEW |
(Empty) | |
| 1 @echo off |
| 2 :: Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 3 :: Use of this source code is governed by a BSD-style license that can be |
| 4 :: found in the LICENSE file. |
| 5 |
| 6 setlocal |
| 7 |
| 8 :: This script will create a scheduled task to run chrome-update every day |
| 9 :: at the time you specify. This script expects to be live in |
| 10 :: depot_tools\latest. |
| 11 :: |
| 12 :: Usage: this-script <time to run task> <path to chrome trunk> |
| 13 |
| 14 set Out=%USERPROFILE%\chrome-update-task.bat |
| 15 set TaskTime=%1 |
| 16 set Trunk=%~f2 |
| 17 |
| 18 if not exist "%Trunk%" ( |
| 19 echo Usage: %~n0 ^<time^> ^<c:\path\to\chrome\trunk^> |
| 20 echo ^<time^> is the time in HH:MM:SS format at which to run the task. |
| 21 echo Example: %~n0 02:00:00 c:\src\chrome\trunk |
| 22 exit 1 |
| 23 ) |
| 24 |
| 25 if not exist "%Out%" goto CreateScript |
| 26 |
| 27 echo WARNING: %Out% already exists. |
| 28 set Choice= |
| 29 set /P Choice=Overwrite file [Y/N]? |
| 30 if not "%Choice%"=="y" goto CreateTask |
| 31 |
| 32 :CreateScript |
| 33 |
| 34 echo. |
| 35 echo Creating %Out% |
| 36 |
| 37 echo>"%Out%" @echo off |
| 38 echo>>"%Out%" call "%~dp0\bootstrap\update.bat" |
| 39 echo>>"%Out%" "%~dp0\chrome-update.bat" "%Trunk%" ^> "%Trunk%\chrome-update-resu
lts.txt" |
| 40 |
| 41 :CreateTask |
| 42 |
| 43 echo. |
| 44 echo *********************************************************************** |
| 45 echo Creating a Scheduled Task to run chrome-update each day at %TaskTime%. |
| 46 echo The batch file being run will live at %Out%. |
| 47 echo. |
| 48 echo WARNING: The password you enter will be displayed in cleartext. |
| 49 echo If you're paranoid, you can enter blank here and then fix the password |
| 50 echo by editing the scheduled task manually from the Control Panel. |
| 51 echo *********************************************************************** |
| 52 echo. |
| 53 schtasks /create /tn chrome-update /tr "\"%Out%\"" /sc daily /st %TaskTime% |
OLD | NEW |