summaryrefslogtreecommitdiffstats
path: root/tools/sdkmanager/app
diff options
context:
space:
mode:
authorRaphael <raphael@google.com>2009-07-02 16:11:30 -0700
committerRaphael <raphael@google.com>2009-07-02 16:21:48 -0700
commitfa9cd9a69431cb3a6e1be4092ee498a56714e093 (patch)
treeab87858f28b66bf0e21203c859fd25594aa85049 /tools/sdkmanager/app
parentde21e3ab24bd8c51290462af072480eada6a0ac7 (diff)
downloadandroid_development-fa9cd9a69431cb3a6e1be4092ee498a56714e093.tar.gz
android_development-fa9cd9a69431cb3a6e1be4092ee498a56714e093.tar.bz2
android_development-fa9cd9a69431cb3a6e1be4092ee498a56714e093.zip
SDK Updater: fix android.bat for Windows to change dirs to the
temp dir. This removes a locked handle to the SDK/tools and allows the update to update its own tools folder.
Diffstat (limited to 'tools/sdkmanager/app')
-rwxr-xr-xtools/sdkmanager/app/etc/android.bat12
1 files changed, 7 insertions, 5 deletions
diff --git a/tools/sdkmanager/app/etc/android.bat b/tools/sdkmanager/app/etc/android.bat
index 3bba8d4a1..b19ce0ab0 100755
--- a/tools/sdkmanager/app/etc/android.bat
+++ b/tools/sdkmanager/app/etc/android.bat
@@ -36,8 +36,8 @@ if not "%1"=="" goto EndTempCopy
echo Starting Android SDK Updater
rem We're now going to create a temp dir to hold all the Jar files needed
- rem to run the android tool, copy them in the temp dir and finally adjust
- rem the paths accordingly. We do this only when the launcher is run without
+ rem to run the android tool, copy them in the temp dir and finally execute
+ rem from that path. We do this only when the launcher is run without
rem arguments, to display the SDK Updater UI. This allows the updater to
rem update the tools directory where the updater itself is located.
@@ -46,8 +46,10 @@ if not "%1"=="" goto EndTempCopy
copy /B /D /Y lib\androidprefs.jar %tmpdir%\lib\ > nul
copy /B /D /Y lib\org.eclipse.* %tmpdir%\lib\ > nul
copy /B /D /Y lib\sdk* %tmpdir%\lib\ > nul
- set jarpath=%tmpdir%\%jarpath%
- set swt_path=%tmpdir%\%swt_path%
+
+ rem jarpath and swt_path are relative to PWD so we don't need to adjust them, just change dirs.
+ set toolsdir=%cd%
+ cd %tmpdir%
:EndTempCopy
@@ -62,4 +64,4 @@ if exist %swt_path% goto SetPath
:SetPath
set javaextdirs=%swt_path%;lib\
-call java -Djava.ext.dirs=%javaextdirs% -Dcom.android.sdkmanager.toolsdir= -Dcom.android.sdkmanager.workdir="%workdir%" -jar %jarpath% %*
+call java -Djava.ext.dirs=%javaextdirs% -Dcom.android.sdkmanager.toolsdir="%toolsdir%" -Dcom.android.sdkmanager.workdir="%workdir%" -jar %jarpath% %*