| #!/bin/bash | |
| # Copyright 2017 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=Build | |
| ### Clean the build directory and then perform a full build | |
| ## usage: fx clean-build [BUILD_ARGS...] | |
| ## | |
| ## Cleans the build directory (via `fx clean`) and then runs `fx build` | |
| ## forwarding any provided arguments. | |
| set -e | |
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $? | |
| case "$1" in | |
| -h|--help) | |
| fx-print-command-help "$0" | |
| exit 0 | |
| ;; | |
| esac | |
| fx-command-run clean | |
| fx-command-run build "$@" |