diff options
author | Alexander Amelkin <a.amelkin@yadro.com> | 2019-07-17 18:11:32 +0300 |
---|---|---|
committer | Brad Bishop <radsquirrel@gmail.com> | 2019-08-08 18:56:29 +0300 |
commit | 88a7fe6ea8f34f0c1ed4d8efcbc497742c4585b1 (patch) | |
tree | f0a2d119ce6e04a7c815bf36b78b63c173dc389c | |
parent | 9293bbf4fdb53f466a30b216aeacc0c0c3ca00fc (diff) | |
download | openbmc-88a7fe6ea8f34f0c1ed4d8efcbc497742c4585b1.tar.xz |
Make `setup` show available targets in columns
The list of targets is getting longer and tends to not fit into
one screen when displayed in one column. Filter it through `column`
tool if available. If not available, then fall back to the old
representation.
Change-Id: I1e827d0835608d2e37ca58705e77a14b0667b170
Signed-off-by: Alexander Amelkin <a.amelkin@yadro.com>
-rwxr-xr-x | setup | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -21,6 +21,13 @@ if [ "$(basename -- "$0")" = "setup" ]; then exit 1 fi +# Check if 'column' command is present +COLUMN=`which column` +if [ -z "$COLUMN" ]; then + # If it is not, use 'cat' + COLUMN=`which cat` +fi + machine() { local target=$1 local build_dir=$2 @@ -54,7 +61,7 @@ machine() { if [ -z "$1" ]; then echo Target machine must be specified. Use one of: echo - (echo qemuarm; machine) | sort + (echo qemuarm; machine) | sort | $COLUMN elif [ "$1" = "qemuarm" ]; then source openbmc-env else |