post_tools_install.bat revision 859fa3ad3a72dd3cd140785c8b7b4dc166ae8cb8
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 33set src=SDK Manager.exe 34set dst=..\..\%src% 35 36if not exist "%src%" goto Cleanup 37 echo Updating %src% 38 copy /V /Y "%src%" "%dst%" 39 40:Cleanup 41set old_dst=..\..\SDK Setup.exe 42if not exist "%old_dst%" goto :EOF 43 echo Removing obsolete %old_dst% 44 del /F /Q "%old_dst%" 45