Chromium Code Reviews| Index: sdk/bin/dart |
| diff --git a/sdk/bin/dart b/sdk/bin/dart |
| index 675963f746cab46906ff24938d59bf6f07a8023a..23eb16fafbaa4f56a5e1424a113bc98b07b4cf36 100755 |
| --- a/sdk/bin/dart |
| +++ b/sdk/bin/dart |
| @@ -20,7 +20,24 @@ CUR_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" |
| if [ -z "$DART_CONFIGURATION" ]; |
| then |
| - DART_CONFIGURATION="ReleaseIA32" |
| + CONFIGS=$( ls "$CUR_DIR"/../../out/ ) |
|
floitsch
2015/08/10 11:48:40
This only works for Linux.
Create a OUT_DIR varia
stanm
2015/08/10 14:51:40
Acknowledged.
|
| + COUNT=$( echo $CONFIGS | wc -w ) |
| + if [ "$COUNT" -eq "0" ]; |
| + then |
| + # keep original behaviour in the case of an empty "out" folder |
| + DART_CONFIGURATION="ReleaseIA32" |
| + else |
| + # if there is a "ReleaseIA32" folder - use it, otherwise - use the last one |
| + # lexicographically |
|
floitsch
2015/08/10 11:48:40
I think it would be nicer to have a list of prefer
stanm
2015/08/10 14:51:40
I thought of doing that initially, but I couldn't
floitsch
2015/08/10 14:56:09
I wouldn't look too far.
I32 und I64 Release and D
floitsch
2015/08/10 14:56:49
You could furthermore include ARM (don't know what
|
| + for CONFIG in $CONFIGS; |
| + do |
| + DART_CONFIGURATION="$CONFIG" |
| + if [ "$CONFIG" = "ReleaseIA32" ]; |
| + then |
| + break |
| + fi |
| + done |
| + fi |
| fi |
| if [[ `uname` == 'Darwin' ]]; |