--- /dev/null
+@echo off\r
+rem Copyright (C) 2010 The Android Open Source Project\r
+rem\r
+rem Licensed under the Apache License, Version 2.0 (the "License");\r
+rem you may not use this file except in compliance with the License.\r
+rem You may obtain a copy of the License at\r
+rem\r
+rem http://www.apache.org/licenses/LICENSE-2.0\r
+rem\r
+rem Unless required by applicable law or agreed to in writing, software\r
+rem distributed under the License is distributed on an "AS IS" BASIS,\r
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+rem See the License for the specific language governing permissions and\r
+rem limitations under the License.\r
+\r
+rem This script is called by the SDK Manager once a new version of the tools\r
+rem package as been installed.\r
+\r
+rem don't modify the caller's environment\r
+setlocal\r
+\r
+rem Set up prog to be the path of this script, including following symlinks,\r
+rem and set up progdir to be the fully-qualified pathname of its directory.\r
+set prog=%~f0\r
+\r
+rem Grab current directory before we change it\r
+set work_dir=%cd%\r
+\r
+rem Change current directory and drive to where the script is, to avoid\r
+rem issues with directories containing whitespaces.\r
+cd /d %~dp0\r
+\r
+set src=SDK Manager.exe\r
+set dst=..\..\%src%\r
+\r
+if not exist "%src%" goto Cleanup\r
+ echo Updating %src%\r
+ copy /V /Y "%src%" "%dst%"\r
+\r
+:Cleanup\r
+set old_dst=..\..\SDK Setup.exe\r
+if not exist "%old_dst%" goto :EOF\r
+ echo Removing obsolete %old_dst%\r
+ del /F /Q "%old_dst%"\r