Ticket #5256: build_haiku_image-sansPipeExit1-useSet_e.patch

File build_haiku_image-sansPipeExit1-useSet_e.patch, 975 bytes (added by mmadia, 14 years ago)
use "set -o errexit" instead of "...
exit 1"
  • build/scripts/build_haiku_image

     
    11#!/bin/sh
     2set -o errexit
    23
    34# The first argument is the shell script that initializes the variables:
    45# sourceDir
     
    122123        fi
    123124
    124125        if [ $isVMwareImage ]; then
    125             $vmdkimage -h 64k $imageFlags "$imagePath" || exit 1
     126            $vmdkimage -h 64k $imageFlags "$imagePath"
    126127        else
    127             $createImage $imageFlags "$imagePath" || exit 1
     128            $createImage $imageFlags "$imagePath"
    128129        fi
    129130
    130131        $bfsShell --initialize $imageOffsetFlags "$imagePath" \
    131             "$imageLabel" "block_size 2048" || exit 1
     132            "$imageLabel" "block_size 2048"
    132133        $makebootable $imageOffsetFlags "$imagePath"
    133134    fi
    134135    $bfsShell -n $imageOffsetFlags "$imagePath" > /dev/null &
    135136    sleep 1
    136137    # bail out, if mounting fails
    137     $cd . || exit 1
     138    $cd .
    138139fi
    139140
    140141echo "Populating image ..."