OLD | NEW |
| (Empty) |
1 #!/bin/bash | |
2 set -e | |
3 | |
4 if [ -n "$DART_SDK" ]; then | |
5 DARTSDK=$DART_SDK | |
6 else | |
7 echo "sdk=== $DARTSDK" | |
8 DART=`which dart|cat` # pipe to cat to ignore the exit code | |
9 DARTSDK=`which dart | sed -e 's/\/dart\-sdk\/.*$/\/dart-sdk/'` | |
10 | |
11 if [ "$DARTSDK" = "/Applications/dart/dart-sdk" ]; then | |
12 # Assume we are a mac machine with standard dart setup | |
13 export DARTIUM="/Applications/dart/chromium/Chromium.app/Contents/MacOS/
Chromium" | |
14 else | |
15 DARTSDK="`pwd`/dart-sdk" | |
16 case $( uname -s ) in | |
17 Darwin) | |
18 export DARTIUM=${DARTIUM:-./dartium/Chromium.app/Contents/MacOS/Chro
mium} | |
19 ;; | |
20 Linux) | |
21 export DARTIUM=${DARTIUM:-./dartium/chrome} | |
22 ;; | |
23 esac | |
24 fi | |
25 fi | |
26 | |
27 export DART_SDK="$DARTSDK" | |
28 export DART=${DART:-"$DARTSDK/bin/dart"} | |
29 export PUB=${PUB:-"$DARTSDK/bin/pub"} | |
30 export DARTANALYZER=${DARTANALYZER:-"$DARTSDK/bin/dartanalyzer"} | |
31 export DARTDOC=${DARTDOC:-"$DARTSDK/bin/dartdoc"} | |
32 export DART_DOCGEN=${DART_DOCGEN:-"$DARTSDK/bin/docgen"} | |
33 | |
34 export CHROME_CANARY_BIN=${CHROME_CANARY_BIN:-"$DARTIUM"} | |
35 export CHROME_BIN=${CHROME_BIN:-"google-chrome"} | |
36 export DART_FLAGS='--enable_type_checks --enable_asserts' | |
37 export PATH=$PATH:$DARTSDK/bin | |
OLD | NEW |