Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 32 lines (24 sloc) 796 Bytes
#!/usr/bin/env bash
# bin/compile <build-dir> <cache-dir>
# fail fast
set -e
unset GIT_DIR
mkdir -p "$1" "$2"
BUILD_DIR=$(cd "$1/" && pwd)
CACHE_DIR=$(cd "$2/" && pwd)
function message {
echo "$1"
sync
}
# official VM is .zip only, which unfortuantely we can't extract on Heroku (doh)
# DART_SDK_SOURCE="https://gsdview.appspot.com/dart-editor-archive-continuous/latest/dart-linux.zip"
DART_SDK_URL="http://commondatastorage.googleapis.com/dartvm/dart-linux.tar.gz"
DART_SDK=$BUILD_DIR/dart-sdk
if [ ! -d "dart-sdk" ]; then
message "-----> Installing latest Dart VM"
cd $BUILD_DIR
curl -L $DART_SDK_URL -s -o - | tar xzf -
curl -L http://commondatastorage.googleapis.com/dartvm/dart-linux.tar.gz -s -o - | tar xzf -
fi
mkdir -p $BUILD_DIR/bin
mv $DART_SDK/bin/* $BUILD_DIR/bin
Something went wrong with that request. Please try again.