rdma.zsh: Various Updates

* Use $COLORS from common.zsh
* Fix colored output when run from another script

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Anna Schumaker 2023-07-19 12:01:58 -04:00
parent c843549aa5
commit e4434babcb
1 changed files with 2 additions and 1 deletions

View File

@ -1,4 +1,5 @@
#!/bin/zsh
source common.zsh
if [ "$#" -lt 2 ]; then
echo "Usage: $0 {rxe,siw,info,start,status,stop,off} {remote host,...}"
@ -55,7 +56,7 @@ rdma_stop() {
}
IFS=$'\n'
tags=($(python /home/anna/bin/colors/vm.py ${@:2}))
tags=($(FORCE_COLOR=1 python $COLORS/vm.py ${@:2}))
for vm in "${@:2}"; do
index=${@[(ie)$vm]}
tag=${tags[index-1]}