Enable image_to_usb to be run from outside the scripts directory.

Review URL: http://chromereview.prom.corp.google.com/1180043


git-svn-id: svn://chrome-svn/chromeos/trunk@154 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
tedbo@google.com 2009-11-04 03:23:20 +00:00
parent 3bfc11f2fe
commit 182c45ee72

View File

@ -79,8 +79,10 @@ then
PART_SIZE=$(stat -c%s "${FLAGS_from}/rootfs.image") # Bytes
echo "Copying root fs..."
sudo ./file_copy.py if="${FLAGS_from}/rootfs.image" of="$FLAGS_to" bs=4M \
seek_bytes=$(( ($PART_SIZE * 2) + 512 ))
sudo "${SCRIPTS_DIR}"/file_copy.py \
if="${FLAGS_from}/rootfs.image" \
of="$FLAGS_to" bs=4M \
seek_bytes=$(( ($PART_SIZE * 2) + 512 ))
# Set up loop device
LOOP_DEV=$(sudo losetup -f)
@ -102,7 +104,8 @@ then
trap - EXIT
echo "Copying MBR..."
sudo ./file_copy.py if="${FLAGS_from}/mbr.image" of="$FLAGS_to"
sudo "${SCRIPTS_DIR}"/file_copy.py \
if="${FLAGS_from}/mbr.image" of="$FLAGS_to"
sync
echo "Done."
else