blob: 00dc98f0f00028f05afc029ce225807b40e6f614 [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.
set -e
DEVSHELL_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
source "${DEVSHELL_DIR}"/lib/image_build_vars.sh || exit $?
export HOST_OUT_DIR
export FUCHSIA_ZBI_COMPRESSION
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 "$@"