From 0bcca894764b692aae04e68b44785200e102a76b Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Thu, 27 Mar 2008 21:11:04 +0000 Subject: [PATCH] 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 --- build/scripts/build_haiku_image | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/build/scripts/build_haiku_image b/build/scripts/build_haiku_image index 89a20880c4..3405fd48ed 100755 --- a/build/scripts/build_haiku_image +++ b/build/scripts/build_haiku_image @@ -95,19 +95,20 @@ if [ $isImage ]; then ddFlags= if [ $isVMwareImage ]; then - rm -f $imagePath - $vmdkheader -h 64k -i${imageSize}M $imagePath || exit 1 + rm -f "$imagePath" + $vmdkheader -h 64k -i${imageSize}M "$imagePath" || exit 1 ddFlags="conv=notrunc oflag=append" dontClearImage= fi - if [ ! -e $imagePath -o ! "$dontClearImage" ]; then - dd if=/dev/zero of=$imagePath bs=1048576 count=$imageSize $ddFlags + if [ ! -e "$imagePath" -o ! "$dontClearImage" ]; then + dd if=/dev/zero of="$imagePath" bs=1048576 count=$imageSize $ddFlags fi - $bfsShell --initialize $imageOffsetFlags $imagePath Haiku "block_size 2048" || exit 1 - $makebootable $imageOffsetFlags $imagePath + $bfsShell --initialize $imageOffsetFlags "$imagePath" Haiku \ + "block_size 2048" || exit 1 + $makebootable $imageOffsetFlags "$imagePath" fi - $bfsShell -n $imageOffsetFlags $imagePath > /dev/null & + $bfsShell -n $imageOffsetFlags "$imagePath" > /dev/null & sleep 1 # bail out, if mounting fails $cd . || exit 1