summaryrefslogtreecommitdiff
path: root/setup
diff options
context:
space:
mode:
authorPatrick Williams <patrick@stwcx.xyz>2022-05-31 17:25:55 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-06-14 07:49:03 +0300
commit6acb610e07e864f5ec8d371dc7964a1852d4feb4 (patch)
tree55260c3a168012387d3477e09094aa32e10fb9fb /setup
parentd2d23601382942f8bc91fd313b438847d674952b (diff)
downloadopenbmc-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-xsetup15
1 files changed, 11 insertions, 4 deletions
diff --git a/setup b/setup
index 5655bfa817..08ac4f4604 100755
--- a/setup
+++ b/setup
@@ -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