Patch by Matt Madia: Use "set -o errexit" to error out when a command failed.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35151 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2010-01-19 02:39:03 +00:00
parent 3cfe017578
commit df6a690eae

View File

@ -1,4 +1,5 @@
#!/bin/sh
set -o errexit
# The first argument is the shell script that initializes the variables:
# sourceDir
@ -122,19 +123,19 @@ if [ $isImage ]; then
fi
if [ $isVMwareImage ]; then
$vmdkimage -h 64k $imageFlags "$imagePath" || exit 1
$vmdkimage -h 64k $imageFlags "$imagePath"
else
$createImage $imageFlags "$imagePath" || exit 1
$createImage $imageFlags "$imagePath"
fi
$bfsShell --initialize $imageOffsetFlags "$imagePath" \
"$imageLabel" "block_size 2048" || exit 1
"$imageLabel" "block_size 2048"
$makebootable $imageOffsetFlags "$imagePath"
fi
$bfsShell -n $imageOffsetFlags "$imagePath" > /dev/null &
sleep 1
# bail out, if mounting fails
$cd . || exit 1
$cd .
fi
echo "Populating image ..."