From 8f14d053f34d0728d0da04d7e5ffb4e6af3095e7 Mon Sep 17 00:00:00 2001 From: Ari Lazier Date: Thu, 17 Dec 2015 12:42:02 -0800 Subject: [PATCH] pr feedback --- scripts/test.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/scripts/test.sh b/scripts/test.sh index 09a4c185..01f3dac7 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -1,3 +1,5 @@ +#!/bin/bash + set -o pipefail set -e @@ -17,9 +19,7 @@ PACKAGER_OUT="packager_out.txt" function start_packager() { - if [ -f $PACKAGER_OUT ]; then - rm $PACKAGER_OUT - fi + rm -f $PACKAGER_OUT sh ./node_modules/react-native/packager/packager.sh > packager_out.txt & while :; do @@ -28,17 +28,14 @@ function start_packager() break else echo "Waiting for packager." - sleep 1 + sleep 2 fi done } function kill_packager() { - if [ -f $PACKAGER_OUT ]; then - rm $PACKAGER_OUT - fi - + rm -f $PACKAGER_OUT pkill node || true }