-# Use the script's first argument or the supplied WEBI_VERSION or ''
-WEBI_VERSION=${1:-${WEBI_VERSION:-}}
-
-# Set a temporary directory, if not already set
-WEBI_TMP=${WEBI_TMP:-"$(mktemp -d -t webinstall-flutter.XXXXXXXX)"}
-
-###################
-# Get WEBI vars #
-###################
-
-# The WEBI bootstrap will define these
-# but each script should be testable in its own right
-
-if [ -z "${WEBI_PKG_URL:-}" ]; then
- release_tab="${WEBI_HOST}/api/releases/flutter@${WEBI_VERSION:-}.csv?os=$(uname -s)&arch=$(uname -m)&limit=1"
- WEBI_CSV=$(curl -fsSL "$release_tab" -H "User-Agent: $(uname -a)")
- WEBI_CHANNEL=$(echo $WEBI_CSV | cut -d ',' -f 3)
- if [ "error" == "$WEBI_CHANNEL" ]; then
- echo "could not find release for flutter v${WEBI_VERSION}"
- exit 1
- fi
- # TODO allow EXT ZIP or TAR in bootstrap script
- WEBI_EXT=$(echo $WEBI_CSV | cut -d ',' -f 8)
- WEBI_VERSION=$(echo $WEBI_CSV | cut -d ',' -f 1)
- WEBI_PKG_URL=$(echo $WEBI_CSV | cut -d ',' -f 9)
- WEBI_PKG_FILE="$WEBI_TMP/$(echo $WEBI_PKG_URL | sed s:.*/::)"
-fi
-