| #!/usr/bin/env bash |
| # Copyright 2023 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 |
| ### List which packages are built. |
| |
| ## Usage: fx list-packages [-e|--exact] [PATTERN] |
| ## |
| ## Lists packages included in the current build configuration. |
| ## |
| ## Flags: |
| ## -e, --exact Match PATTERN exactly against the full package name |
| ## |
| ## Arguments: |
| ## PATTERN Regular expression to filter packages (substring match by default) |
| ## |
| |
| readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" |
| source "$SCRIPT_DIR/../lib/vars.sh" || exit $? |
| |
| fx-config-read |
| "${PREBUILT_PYTHON3}" "$SCRIPT_DIR/list_packages.py" "$@" |