| #!/bin/bash |
| # Copyright 2019 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. |
| |
| #### DEPRECATED |
| #### CATEGORY=Run, inspect and debug |
| ### Obtain and parse a bugreport from a connected target. |
| |
| ## Connects to a running target and obtains a bugreport that contains useful |
| ## information for debugging a target. |
| ## |
| ## Information supplied includes: |
| ## - Build information and annotations. |
| ## - Kernel and System logs. |
| ## - Inspect Data. |
| ## |
| ## If no directory is supplied, a unique one will be generated. |
| ## |
| ## Please use fx snapshot instead. Same outcome, just not deprecated. |
| ## |
| ## Usage: fx bugreport [(--output-directory|-o)] <DIRECTORY>] -- <TARGET ARGS> |
| ## |
| ## --output-directory (Optional) Directory where the files will be stored. |
| ## Must be an existing directory. |
| ## |
| ## <TARGET ARGS> Arguments to be passed to the bugreport client within |
| ## the target. |
| |
| source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/../lib/vars.sh || exit $? |
| |
| fx-warn "Consider fx snapshot. fx bugreport is being deprecated and will take longer and longer." |
| sleep 16 |
| fx-command-run snapshot "$@" |
| exit $? |