2016-10-15 00:48:34 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# Copyright 2016 Google Inc. Use of this source code is governed by an MIT-style
|
|
|
|
# license that can be found in the LICENSE file or at
|
|
|
|
# https://opensource.org/licenses/MIT.
|
|
|
|
|
|
|
|
# This script drives the standalone Sass package, which bundles together a Dart
|
|
|
|
# executable and a snapshot of Sass. It can be created with `pub run grinder
|
|
|
|
# package`.
|
|
|
|
|
2016-12-02 22:36:15 +01:00
|
|
|
function follow_links() {
|
|
|
|
file="$1"
|
|
|
|
while [ -h "$file" ]; do
|
|
|
|
# On Mac OS, readlink -f doesn't work.
|
|
|
|
file="$(readlink "$file")"
|
|
|
|
done
|
|
|
|
echo "$file"
|
|
|
|
}
|
|
|
|
|
|
|
|
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
|
|
|
|
path=`dirname "$(follow_links "$BASH_SOURCE")"`
|
2016-10-21 22:51:34 +02:00
|
|
|
exec "$path/src/dart" "-Dversion=SASS_VERSION" "$path/src/sass.dart.snapshot" "$@"
|