Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(127)

Side by Side Diff: sdk/bin/pub.bat

Issue 557563002: Store the async-await compiled pub code directly in the repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 @echo off 1 @echo off
2 REM Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 2 REM Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
3 REM for details. All rights reserved. Use of this source code is governed by a 3 REM for details. All rights reserved. Use of this source code is governed by a
4 REM BSD-style license that can be found in the LICENSE file. 4 REM BSD-style license that can be found in the LICENSE file.
5 5
6 rem Run pub.dart on the Dart VM. This script is only used when running pub from 6 rem Run pub.dart on the Dart VM. This script is only used when running pub from
7 rem within the Dart source repo. The shipped SDK instead uses "pub_sdk.bat", 7 rem within the Dart source repo. The shipped SDK instead uses "pub_sdk.bat",
8 rem which is renamed to "pub.bat" when the SDK is built. 8 rem which is renamed to "pub.bat" when the SDK is built.
9 9
10 setlocal 10 setlocal
(...skipping 19 matching lines...) Expand all
30 30
31 rem Use the Dart binary in the built SDK so pub can find the version file next 31 rem Use the Dart binary in the built SDK so pub can find the version file next
32 rem to it. 32 rem to it.
33 set BUILD_DIR=%SDK_DIR%\..\build\ReleaseIA32 33 set BUILD_DIR=%SDK_DIR%\..\build\ReleaseIA32
34 set PACKAGES_DIR=%BUILD_DIR%\pub_packages 34 set PACKAGES_DIR=%BUILD_DIR%\pub_packages
35 set DART=%BUILD_DIR%\dart-sdk\bin\dart 35 set DART=%BUILD_DIR%\dart-sdk\bin\dart
36 36
37 rem Compile async/await down to vanilla Dart. 37 rem Compile async/await down to vanilla Dart.
38 rem TODO(rnystrom): Remove this when #104 is fixed. 38 rem TODO(rnystrom): Remove this when #104 is fixed.
39 set ASYNC_COMPILER="%SDK_DIR%"\lib\_internal\pub\bin\async_compile.dart 39 set ASYNC_COMPILER="%SDK_DIR%"\lib\_internal\pub\bin\async_compile.dart
40 "%DART%" --package-root="%PACKAGES_DIR%" "%ASYNC_COMPILER%" "%BUILD_DIR%" ^ 40 "%DART%" --package-root="%PACKAGES_DIR%" "%ASYNC_COMPILER%" "%BUILD_DIR%"
41 --silent
42 41
43 rem Run the async/await compiled pub. 42 rem Run the async/await compiled pub.
44 set PUB="%BUILD_DIR%\pub_async\bin\pub.dart" 43 set PUB="%SDK_DIR%"\lib\_internal\pub_generated\bin\pub.dart"
45 "%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %* 44 "%DART%" %VM_OPTIONS% --package-root="%PACKAGES_DIR%" "%PUB%" %*
46 45
47 endlocal 46 endlocal
48 47
49 exit /b %errorlevel% 48 exit /b %errorlevel%
50 49
51 :follow_links 50 :follow_links
52 setlocal 51 setlocal
53 for %%i in (%1) do set result=%%~fi 52 for %%i in (%1) do set result=%%~fi
54 set current= 53 set current=
55 for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^ 54 for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
56 ^| find "> %~n1 ["`) do ( 55 ^| find "> %~n1 ["`) do (
57 set current=%%i 56 set current=%%i
58 ) 57 )
59 if not "%current%"=="" call :follow_links "%current%", result 58 if not "%current%"=="" call :follow_links "%current%", result
60 endlocal & set %~2=%result% 59 endlocal & set %~2=%result%
61 goto :eof 60 goto :eof
62 61
63 :end 62 :end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698