| OLD | NEW |
| 1 #!/usr/bin/env bash | 1 #!/usr/bin/env bash |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 # Run pub.dart on the Dart VM. This script is only used when running pub from | 6 # Run pub.dart on the Dart VM. This script is only used when running pub from |
| 7 # within the Dart source repo. The shipped SDK instead uses "pub_sdk", which is | 7 # within the Dart source repo. The shipped SDK instead uses "pub_sdk", which is |
| 8 # renamed to "pub" when the SDK is built. | 8 # renamed to "pub" when the SDK is built. |
| 9 | 9 |
| 10 function follow_links() { | 10 function follow_links() { |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 if [[ $DART_VM_OPTIONS ]]; then | 40 if [[ $DART_VM_OPTIONS ]]; then |
| 41 read -a OPTIONS <<< "$DART_VM_OPTIONS" | 41 read -a OPTIONS <<< "$DART_VM_OPTIONS" |
| 42 VM_OPTIONS+=("${OPTIONS[@]}") | 42 VM_OPTIONS+=("${OPTIONS[@]}") |
| 43 fi | 43 fi |
| 44 | 44 |
| 45 if [ -z "$DART_CONFIGURATION" ]; | 45 if [ -z "$DART_CONFIGURATION" ]; |
| 46 then | 46 then |
| 47 DIRS=$( ls "$OUT_DIR" ) | 47 DIRS=$( ls "$OUT_DIR" ) |
| 48 # list of possible configurations in decreasing desirability | 48 # list of possible configurations in decreasing desirability |
| 49 CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32" | 49 CONFIGS=("ReleaseX64" "ReleaseIA32" "DebugX64" "DebugIA32" |
| 50 "ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" "ReleaseMIPS" | 50 "ReleaseARM" "ReleaseARM64" "ReleaseARMV5TE" |
| 51 "DebugARM" "DebugARM64" "DebugARMV5TE" "DebugMIPS") | 51 "DebugARM" "DebugARM64" "DebugARMV5TE") |
| 52 DART_CONFIGURATION="None" | 52 DART_CONFIGURATION="None" |
| 53 for CONFIG in ${CONFIGS[*]} | 53 for CONFIG in ${CONFIGS[*]} |
| 54 do | 54 do |
| 55 for DIR in $DIRS; | 55 for DIR in $DIRS; |
| 56 do | 56 do |
| 57 if [ "$CONFIG" = "$DIR" ]; | 57 if [ "$CONFIG" = "$DIR" ]; |
| 58 then | 58 then |
| 59 # choose most desirable configuration that is available and break | 59 # choose most desirable configuration that is available and break |
| 60 DART_CONFIGURATION="$DIR" | 60 DART_CONFIGURATION="$DIR" |
| 61 break 2 | 61 break 2 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 76 BUILD_DIR="$SDK_DIR/../out/$DART_CONFIGURATION" | 76 BUILD_DIR="$SDK_DIR/../out/$DART_CONFIGURATION" |
| 77 fi | 77 fi |
| 78 | 78 |
| 79 # Use the Dart binary in the built SDK so pub can find the version file next | 79 # Use the Dart binary in the built SDK so pub can find the version file next |
| 80 # to it. | 80 # to it. |
| 81 DART="$BUILD_DIR/dart-sdk/bin/dart" | 81 DART="$BUILD_DIR/dart-sdk/bin/dart" |
| 82 | 82 |
| 83 # Run pub. | 83 # Run pub. |
| 84 PUB="$SDK_DIR/../third_party/pkg/pub/bin/pub.dart" | 84 PUB="$SDK_DIR/../third_party/pkg/pub/bin/pub.dart" |
| 85 exec "$DART" "--packages=$SDK_DIR/../.packages" "${VM_OPTIONS[@]}" "$PUB" "$@" | 85 exec "$DART" "--packages=$SDK_DIR/../.packages" "${VM_OPTIONS[@]}" "$PUB" "$@" |
| OLD | NEW |