From 83b28c1075caf58a0d6b372356687ca4f56f13c4 Mon Sep 17 00:00:00 2001 From: Christopher Fujino Date: Wed, 20 Oct 2021 15:28:02 -0700 Subject: [PATCH] [flutter_conductor] remove old conductor entrypoint (#92219) --- dev/tools/bin/conductor | 40 ---------------------------------------- 1 file changed, 40 deletions(-) delete mode 100755 dev/tools/bin/conductor diff --git a/dev/tools/bin/conductor b/dev/tools/bin/conductor deleted file mode 100755 index 2897339d52b..00000000000 --- a/dev/tools/bin/conductor +++ /dev/null @@ -1,40 +0,0 @@ -#!/usr/bin/env bash - -set -euo pipefail - -# Needed because if it is set, cd may print the path it changed to. -unset CDPATH - -# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one -# link at a time, and then cds into the link destination and find out where it -# ends up. -# -# The returned filesystem path must be a format usable by Dart's URI parser, -# since the Dart command line tool treats its argument as a file URI, not a -# filename. For instance, multiple consecutive slashes should be reduced to a -# single slash, since double-slashes indicate a URI "authority", and these are -# supposed to be filenames. There is an edge case where this will return -# multiple slashes: when the input resolves to the root directory. However, if -# that were the case, we wouldn't be running this shell, so we don't do anything -# about it. -# -# The function is enclosed in a subshell to avoid changing the working directory -# of the caller. -function follow_links() ( - cd -P "$(dirname -- "$1")" - file="$PWD/$(basename -- "$1")" - while [[ -h "$file" ]]; do - cd -P "$(dirname -- "$file")" - file="$(readlink -- "$file")" - cd -P "$(dirname -- "$file")" - file="$PWD/$(basename -- "$file")" - done - echo "$file" -) - -PROG_NAME="$(follow_links "${BASH_SOURCE[0]}")" -BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" -REPO_DIR="$BIN_DIR/../../.." -DART_BIN="$REPO_DIR/bin/dart" - -"$DART_BIN" --enable-asserts "$REPO_DIR/dev/conductor/bin/conductor.dart" "$@"