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

Unified Diff: sdk/bin/dart

Issue 1276333002: sdk/dart now detects an available build (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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' ]];
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698