diff options
author | Patrick Williams <patrick@stwcx.xyz> | 2022-05-31 17:25:55 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2022-06-14 07:49:03 +0300 |
commit | 6acb610e07e864f5ec8d371dc7964a1852d4feb4 (patch) | |
tree | 55260c3a168012387d3477e09094aa32e10fb9fb /setup | |
parent | d2d23601382942f8bc91fd313b438847d674952b (diff) | |
download | openbmc-6acb610e07e864f5ec8d371dc7964a1852d4feb4.tar.xz |
setup: minor changes to machine list
- Pass column results to `expand` to eliminate tabs.
This enables easy copy/paste into markdown files for updating.
- Filter out QEMU machines.
We enable the QEMU machines from Yocto to be used for building but
they're not actively supported. Remove them to reduce the noise
in the tool output.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I53c3f039cb36c705aa614627aeb40b20471c499c
Diffstat (limited to 'setup')
-rwxr-xr-x | setup | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -21,10 +21,17 @@ if [ -z "$ZSH_NAME" ] && [ "$(basename -- "$0")" = "setup" ]; then fi # Check if 'column' command is present -COLUMN=$(which column || true) -if [ -z "$COLUMN" ]; then +COLUMN_CMD=$(which column || true) +if [ -z "$COLUMN_CMD" ]; then # If it is not, use 'cat' - COLUMN=$(which cat) + COLUMN=( "$(which cat)" ) +else + EXPAND_CMD=$(which expand || true) + if [ -n "$EXPAND_CMD" ]; then + COLUMN=( "sh" "-c" "$COLUMN_CMD | $EXPAND_CMD" ) + else + COLUMN=( "$COLUMN_CMD" ) + fi fi machine() { @@ -89,7 +96,7 @@ machine() { if [ -z "$1" ]; then echo Target machine must be specified. Use one of: echo - machine | sort | $COLUMN + machine | sort | sed "s/qemu[^[:space:]]*//" | "${COLUMN[@]}" else bld_dir=$2 if [ -z "$2" ]; then |