Fix cells command
"cells" throws errors when $ONOS_CELL is not set
Change-Id: Ia41bbd9e877dbffc86ddaaf0f5e5adcd96bba2ad
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index e4c3372..3994f3e 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -234,7 +234,7 @@
function cells {
for cell in $(ls -1 $ONOS_ROOT/tools/test/cells); do
printf "%-16s %s\n" \
- "$([ $cell = $ONOS_CELL ] && echo $cell '*' || echo $cell)" \
+ "$([ ! -z $ONOS_CELL ] && [ $cell = $ONOS_CELL ] && echo $cell '*' || echo $cell)" \
"$(grep '^#' $ONOS_ROOT/tools/test/cells/$cell | head -n 1)"
done
}