wait-for-emulator: don't prepend "unknown"

This way, error lines like this one:

    Waiting for emulator to start: unknown: error: no devices found

Become:

    Waiting for emulator to start: error: no devices found
This commit is contained in:
Daniel Martí 2016-04-29 20:49:19 +01:00
parent 7bc130d81a
commit 128d390e9c

View File

@ -16,7 +16,7 @@ explain() {
elif [[ "$1" =~ "running" ]]; then elif [[ "$1" =~ "running" ]]; then
printf "booting" printf "booting"
else else
printf "unknown: $1" printf "$1"
fi fi
} }
@ -31,10 +31,9 @@ while true; do
if [[ "$out" =~ "stopped" ]]; then if [[ "$out" =~ "stopped" ]]; then
break break
fi fi
exp=$(explain "$out")
let "r = sec % 5" let "r = sec % 5"
if [[ $r -eq 0 ]]; then if [[ $r -eq 0 ]]; then
echo "Waiting for emulator to start: $exp" echo "Waiting for emulator to start: $(explain "$out")"
fi fi
sleep 1 sleep 1
let "sec++" let "sec++"