blob: 17f4dbd0bbd992fcef91d78b7a6ff5ab7cd64af2 [file] [log] [blame]
#!/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.
### list products available for building
## usage: fx list-products
##
## Lists all products that are available for building. These are names that
## can be passed to `fx set`
source "$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"/lib/vars.sh || exit $?
cd "${FUCHSIA_DIR}"
product_gnis=($(echo {.,vendor/*}/products/*.gni | xargs -n 1 basename | sort))
for product in "${product_gnis[@]}"
do
echo "${product%%.gni}"
done