blob: 131d2cef5655daa28559b7e6e9fcf1e63ceb6875 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/hint/bash
_verlte() { printf '%s\n' "$1" "$2" | sort -C -V; }
_verlt() { ! _verlte "$2" "$1"; }
_ln() { rm -rf "$2" && ln -sf "$1" "$2"; }
_setup_env()
{
export PATH="${srcdir}/flutter/bin:$PATH"
export FLUTTER_ENGINE="${srcdir}/flutter-engine"
if [[ ! -v _engine_version ]]; then
_engine_version="$(git -C "${FLUTTER_ENGINE}" describe --tags)"
fi
if [[ -n "$_engine_version" ]] && _verlt "$_engine_version" '3.16.0'; then
export ARCH_FLUTTER_OPTS='--local-engine=arch_release --no-version-check --suppress-analytics'
else
export ARCH_FLUTTER_OPTS='--local-engine=arch_release --local-engine-host=arch_release --no-version-check --suppress-analytics'
fi
}
|