mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
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:
parent
3bfc11f2fe
commit
182c45ee72
@ -79,7 +79,9 @@ 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 \
|
||||
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
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user