From 90d9f5debd4aef9451016aa9921371c517df8e82 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 2 Aug 2015 14:39:17 +0200 Subject: [PATCH] Remove bashisms in nacl-test-wrapper.sh --- test/default/nacl-test-wrapper.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/default/nacl-test-wrapper.sh b/test/default/nacl-test-wrapper.sh index 5b5468af..d60ae26b 100755 --- a/test/default/nacl-test-wrapper.sh +++ b/test/default/nacl-test-wrapper.sh @@ -1,4 +1,4 @@ -#! /usr/bin/env bash +#! /bin/sh if [ -z "$NACL_SDK_ROOT" -o -z "$PNACL_TRANSLATE" -o -z "$PNACL_FINALIZE" ] then @@ -12,14 +12,15 @@ fi if [ ! -f "$1.nexe" ] then $PNACL_FINALIZE "$1" -o "$1.final" - $PNACL_TRANSLATE -arch `uname -m` "$1.final" -o "$1.nexe" + $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; } -ANY=(`find $NACL_SDK_ROOT -name sel_ldr.py`) -if [ -z ${ANY[0]} ] +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" exit 1 fi -python ${ANY[0]} "$1.nexe" + +exec python "$SEL_LDR" "$1.nexe"