We can return early and it was practically a failure, so non-zero code would be better. (We probably shouldn't generate a useless test, but that's for later.) Indentation will be fixed later. Signed-off-by: Radim Krčmář <rkrcmar@xxxxxxxxxx> --- scripts/mkstandalone.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/mkstandalone.sh b/scripts/mkstandalone.sh index b2bc2f7d6c2e..70efe64af243 100755 --- a/scripts/mkstandalone.sh +++ b/scripts/mkstandalone.sh @@ -76,12 +76,12 @@ done EOF fi -if [ ! -f $kernel ]; then - cat <<EOF -echo "skip $testname (test kernel not present)" 1>&2 -exit 1 -EOF -else + if [ ! -f $kernel ]; then + echo 'echo "skip '"$testname"' (test kernel not present)" 1>&2' + echo 'exit 1' + else + # XXX: bad indentation + echo "trap 'rm -f \$cleanup' EXIT" temp_file bin "$kernel" @@ -110,7 +110,8 @@ else fi exit 0 EOF -fi + fi + exec 1<&$tmpfd {tmpfd}<&- chmod +x $standalone -- 2.7.0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html