Tools: fix style consistency in shell scripts "if [...]; then"

This commit is contained in:
Matthias Grob
2019-02-24 11:20:38 -05:00
committed by Daniel Agar
parent c21849b9b5
commit bee1835831
9 changed files with 38 additions and 75 deletions
+1 -2
View File
@@ -12,8 +12,7 @@ set i {{ command.instance }}
{% endif -%}
# get the device & baudrate
sh $PRT_F
if [ $SERIAL_DEV != none ]
then
if [ $SERIAL_DEV != none ]; then
{% if not constrained_flash -%}
echo "Starting {{ command.label }} on $SERIAL_DEV"
{% endif -%}
+2 -4
View File
@@ -4,10 +4,8 @@
set SERIAL_DEV none
{% for serial_device in serial_devices -%}
if param compare "$PRT" {{ serial_device.index }}
then
if [ "x$PRT_{{ serial_device.tag }}_" = "x" ]
then
if param compare "$PRT" {{ serial_device.index }}; then
if [ "x$PRT_{{ serial_device.tag }}_" = "x" ]; then
set SERIAL_DEV {{ serial_device.device }}
set BAUD_PARAM SER_{{ serial_device.tag }}_BAUD
set PRT_{{ serial_device.tag }}_ 1