Raphael | 59cd9ce | 2010-01-28 20:06:46 -0800 | [diff] [blame] | 1 | @echo off
|
| 2 | rem Copyright (C) 2010 The Android Open Source Project
|
| 3 | rem
|
| 4 | rem Licensed under the Apache License, Version 2.0 (the "License");
|
| 5 | rem you may not use this file except in compliance with the License.
|
| 6 | rem You may obtain a copy of the License at
|
| 7 | rem
|
| 8 | rem http://www.apache.org/licenses/LICENSE-2.0
|
| 9 | rem
|
| 10 | rem Unless required by applicable law or agreed to in writing, software
|
| 11 | rem distributed under the License is distributed on an "AS IS" BASIS,
|
| 12 | rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 13 | rem See the License for the specific language governing permissions and
|
| 14 | rem limitations under the License.
|
| 15 |
|
| 16 | rem This script is called by the SDK Manager once a new version of the tools
|
| 17 | rem package as been installed.
|
| 18 |
|
| 19 | rem don't modify the caller's environment
|
| 20 | setlocal
|
| 21 |
|
| 22 | rem Set up prog to be the path of this script, including following symlinks,
|
| 23 | rem and set up progdir to be the fully-qualified pathname of its directory.
|
| 24 | set prog=%~f0
|
| 25 |
|
| 26 | rem Grab current directory before we change it
|
| 27 | set work_dir=%cd%
|
| 28 |
|
| 29 | rem Change current directory and drive to where the script is, to avoid
|
| 30 | rem issues with directories containing whitespaces.
|
| 31 | cd /d %~dp0
|
| 32 |
|
Raphael Moll | 1e0661b | 2011-09-17 11:25:36 -0700 | [diff] [blame] | 33 | :Step1
|
Raphael Moll | 0913421 | 2010-08-21 18:03:49 -0700 | [diff] [blame] | 34 | set src=SDK Manager.exe
|
Raphael | 59cd9ce | 2010-01-28 20:06:46 -0800 | [diff] [blame] | 35 | set dst=..\..\%src%
|
| 36 |
|
Raphael Moll | 1e0661b | 2011-09-17 11:25:36 -0700 | [diff] [blame] | 37 | if not exist "%src%" goto Step2
|
| 38 | echo Updating %src%
|
| 39 | copy /V /Y "%src%" "%dst%"
|
| 40 |
|
| 41 | :Step2
|
| 42 | set src=AVD Manager.exe
|
| 43 | set dst=..\..\%src%
|
| 44 |
|
Raphael Moll | 0913421 | 2010-08-21 18:03:49 -0700 | [diff] [blame] | 45 | if not exist "%src%" goto Cleanup
|
Raphael | 59cd9ce | 2010-01-28 20:06:46 -0800 | [diff] [blame] | 46 | echo Updating %src%
|
Raphael Moll | 0913421 | 2010-08-21 18:03:49 -0700 | [diff] [blame] | 47 | copy /V /Y "%src%" "%dst%"
|
| 48 |
|
| 49 | :Cleanup
|
| 50 | set old_dst=..\..\SDK Setup.exe
|
| 51 | if not exist "%old_dst%" goto :EOF
|
| 52 | echo Removing obsolete %old_dst%
|
| 53 | del /F /Q "%old_dst%"
|