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