Commit e6a827e8 authored by Jason Simmons's avatar Jason Simmons

Merge pull request #2847 from jason-simmons/flutter_absolute_path

Set FLUTTER_ROOT to an absolute path
parents da88f1d0 e10b74cd
......@@ -5,7 +5,19 @@
set -e
export FLUTTER_ROOT=$(dirname $(dirname "${BASH_SOURCE[0]}"))
function follow_links() {
file="$1"
while [ -h "$file" ]; do
# On Mac OS, readlink -f doesn't work.
file="$(readlink "$file")"
done
echo "$file"
}
PROG_NAME="$(follow_links "$BASH_SOURCE")"
BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
export FLUTTER_ROOT="$(cd "${BIN_DIR}/.." ; pwd -P)"
FLUTTER_TOOLS_DIR="$FLUTTER_ROOT/packages/flutter_tools"
SNAPSHOT_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.snapshot"
STAMP_PATH="$FLUTTER_ROOT/bin/cache/flutter_tools.stamp"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment