Quote the image path to deal gracefully with spaces and the like.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24610 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -95,19 +95,20 @@ if [ $isImage ]; then
|
|||||||
|
|
||||||
ddFlags=
|
ddFlags=
|
||||||
if [ $isVMwareImage ]; then
|
if [ $isVMwareImage ]; then
|
||||||
rm -f $imagePath
|
rm -f "$imagePath"
|
||||||
$vmdkheader -h 64k -i${imageSize}M $imagePath || exit 1
|
$vmdkheader -h 64k -i${imageSize}M "$imagePath" || exit 1
|
||||||
ddFlags="conv=notrunc oflag=append"
|
ddFlags="conv=notrunc oflag=append"
|
||||||
dontClearImage=
|
dontClearImage=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -e $imagePath -o ! "$dontClearImage" ]; then
|
if [ ! -e "$imagePath" -o ! "$dontClearImage" ]; then
|
||||||
dd if=/dev/zero of=$imagePath bs=1048576 count=$imageSize $ddFlags
|
dd if=/dev/zero of="$imagePath" bs=1048576 count=$imageSize $ddFlags
|
||||||
fi
|
fi
|
||||||
$bfsShell --initialize $imageOffsetFlags $imagePath Haiku "block_size 2048" || exit 1
|
$bfsShell --initialize $imageOffsetFlags "$imagePath" Haiku \
|
||||||
$makebootable $imageOffsetFlags $imagePath
|
"block_size 2048" || exit 1
|
||||||
|
$makebootable $imageOffsetFlags "$imagePath"
|
||||||
fi
|
fi
|
||||||
$bfsShell -n $imageOffsetFlags $imagePath > /dev/null &
|
$bfsShell -n $imageOffsetFlags "$imagePath" > /dev/null &
|
||||||
sleep 1
|
sleep 1
|
||||||
# bail out, if mounting fails
|
# bail out, if mounting fails
|
||||||
$cd . || exit 1
|
$cd . || exit 1
|
||||||
|
|||||||
Reference in New Issue
Block a user