blob: 24b0b5f141c40123cba440e557617bd7c43c1192 [file] [log] [blame]
#!/bin/bash
# Copyright 2020 The Fuchsia Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#### CATEGORY=Other
### entry point to start/stop the Fuchsia emulator via fuchsia virtual device launcher
set -e
DEVSHELL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
source "${DEVSHELL_DIR}"/lib/vars.sh || exit $?
echo
fx-warn "This tool has been deprecated."
fx-warn "Please change your tools and workflows to use 'ffx emu' instead."
fx-warn "If you have questions or concerns, please reach out to femu-core@google.com."
fx-warn "Terminating script."
echo
exit 1
function main {
local build=false
if is_feature_enabled "incremental"; then
# In incremental workflows, build/refresh images is enabled by default
build=true
fi
args=()
while (( $# )); do
case "$1" in
--no-build)
build=false
;;
--build)
build=true
;;
--help|kill)
# these options don't require building images
build=false
args+=( "$1" )
;;
*)
args+=( "$1" )
esac
shift
done
if $build; then
fx-info "Building/refreshing target 'images'"
fx-command-run build images
fi
fx-command-exec host-tool fvdl "${args[@]}"
}
main "$@"