From 858b8e8c5eec7d8768d71462e3ada7ce55d99399 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 29 Apr 2016 20:49:35 +0200 Subject: [PATCH] Put `then` and `if` on the same line. Having `then` aligned with `if` was pretty confusing, and I kept reading `else` instead of `then`. --- test/default/nacl-test-wrapper.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/test/default/nacl-test-wrapper.sh b/test/default/nacl-test-wrapper.sh index d60ae26b..52f44cfc 100755 --- a/test/default/nacl-test-wrapper.sh +++ b/test/default/nacl-test-wrapper.sh @@ -1,7 +1,6 @@ #! /bin/sh -if [ -z "$NACL_SDK_ROOT" -o -z "$PNACL_TRANSLATE" -o -z "$PNACL_FINALIZE" ] -then +if [ -z "$NACL_SDK_ROOT" -o -z "$PNACL_TRANSLATE" -o -z "$PNACL_FINALIZE" ]; then echo "One or more variables need to be set: \$NACL_SDK_ROOT=$NACL_SDK_ROOT \$PNACL_TRANSLATE=$PNACL_TRANSLATE @@ -9,17 +8,17 @@ then exit 1 fi -if [ ! -f "$1.nexe" ] -then +if [ ! -f "$1.nexe" ]; then $PNACL_FINALIZE "$1" -o "$1.final" $PNACL_TRANSLATE -arch $(uname -m) "$1.final" -o "$1.nexe" fi -command -v python >/dev/null 2>&1 || { echo >&2 "I require python but it's not installed. Aborting."; exit 1; } +which python >/dev/null 2>&1 || \ + { echo >&2 "Python not found. Aborting."; exit 1; } + SEL_LDR=$(find "$NACL_SDK_ROOT" -name sel_ldr.py | head -n 1) -if [ -z "$SEL_LDR" ] -then - echo "Couldn't find a sel_ldr.py under $NACL_SDK_ROOT" +if [ -z "$SEL_LDR" ]; then + echo "Couldn't find sel_ldr.py under $NACL_SDK_ROOT" exit 1 fi