OSDN Git Service

original
[gb-231r1-is01/GB_2.3_IS01.git] / sdk / files / post_tools_install.bat
diff --git a/sdk/files/post_tools_install.bat b/sdk/files/post_tools_install.bat
new file mode 100644 (file)
index 0000000..36e3279
--- /dev/null
@@ -0,0 +1,44 @@
+@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