refactor: Move Flutter-licensed code into third_party (#306)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
# This is the list of Shorebird Authors.
|
||||||
|
# Names should be added to this file as one of
|
||||||
|
# Organization's name
|
||||||
|
# Individual's name <submission email address>
|
||||||
|
# Individual's name <submission email address> <email2> <emailN>
|
||||||
|
Code Town, Inc.
|
||||||
+8
-37
@@ -1,45 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
# Copyright 2014 The Flutter Authors. All rights reserved.
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Needed because if it is set, cd may print the path it changed to.
|
# shared.sh expects PROG_NAME, BIN_DIR, and OS to be set.
|
||||||
unset CDPATH
|
# https://gist.github.com/ptc-mrucci/61772387878ed53a6c717d51a21d9371
|
||||||
|
# https://stackoverflow.com/questions/59895/how-do-i-get-the-directory-where-a-bash-script-is-located-from-within-the-script/67149152#67149152
|
||||||
|
|
||||||
# On Mac OS, readlink -f doesn't work, so follow_links traverses the path one
|
BIN_DIR=$(cd "$(dirname "$BASH_SOURCE")"; cd -P "$(dirname "$(readlink "$BASH_SOURCE" || echo .)")"; pwd)
|
||||||
# link at a time, and then cds into the link destination and find out where it
|
PROG_NAME="$BIN_DIR/$(basename "$BASH_SOURCE")"
|
||||||
# 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)"
|
|
||||||
OS="$(uname -s)"
|
OS="$(uname -s)"
|
||||||
|
|
||||||
# To define `shared::execute()` function
|
source "$BIN_DIR/../third_party/flutter/bin/internal/shared.sh"
|
||||||
source "$BIN_DIR/internal/shared.sh"
|
|
||||||
|
|
||||||
|
# We currently depend on a forked (3.7.8 stable) Flutter shared.sh script
|
||||||
|
# under third_party. Eventually we'll re-write it ourselves.
|
||||||
shared::execute "$@"
|
shared::execute "$@"
|
||||||
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
This directory contains third-party code that is used by the Shorebird
|
||||||
|
project. This code is not covered under the same licenses as the rest of
|
||||||
|
the Shorebird project.
|
||||||
Vendored
+2137
File diff suppressed because one or more lines are too long
Vendored
+25
@@ -0,0 +1,25 @@
|
|||||||
|
Copyright 2014 The Flutter Authors. All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without modification,
|
||||||
|
are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright
|
||||||
|
notice, this list of conditions and the following disclaimer.
|
||||||
|
* Redistributions in binary form must reproduce the above
|
||||||
|
copyright notice, this list of conditions and the following
|
||||||
|
disclaimer in the documentation and/or other materials provided
|
||||||
|
with the distribution.
|
||||||
|
* Neither the name of Google Inc. nor the names of its
|
||||||
|
contributors may be used to endorse or promote products derived
|
||||||
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
|
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
|
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
Vendored
+1744
File diff suppressed because one or more lines are too long
Vendored
+2
@@ -0,0 +1,2 @@
|
|||||||
|
This directory contains (modified) copies of files from the Flutter
|
||||||
|
project.
|
||||||
Reference in New Issue
Block a user