build: Update build_image.sh for non-~/chromeos setups.

BUG=659

Review URL: http://codereview.chromium.org/431001

git-svn-id: svn://chrome-svn/chromeos/trunk@305 06c00378-0e64-4dae-be16-12b19f9950a1
This commit is contained in:
derat@google.com 2009-11-21 23:44:14 +00:00
parent 86dcc8e68b
commit 4e7a92bd48
2 changed files with 7 additions and 5 deletions

View File

@ -274,7 +274,7 @@ sudo sfdisk -H64 -S32 -uS -f "$MBR_IMG" <<EOF
; ;
EOF EOF
OUTSIDE_OUTPUT_DIR="~/chromeos/src/build/images/${IMAGE_SUBDIR}" OUTSIDE_OUTPUT_DIR="${EXTERNAL_TRUNK_PATH}/src/build/images/${IMAGE_SUBDIR}"
echo "Done. Image created in ${OUTPUT_DIR}" echo "Done. Image created in ${OUTPUT_DIR}"
echo "To copy to USB keyfob, outside the chroot, do something like:" echo "To copy to USB keyfob, outside the chroot, do something like:"
echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb" echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdb"

View File

@ -125,10 +125,12 @@ then
REVISION="CHROMEOS_REVISION=$REVISION" REVISION="CHROMEOS_REVISION=$REVISION"
fi fi
# Run command or interactive shell # Run command or interactive shell. Also include the non-chrooted path to
sudo chroot "$FLAGS_chroot" sudo -i -u $USER $REVISION "$@" # the source trunk for scripts that may need to print it (e.g.
# build_image.sh).
sudo chroot "$FLAGS_chroot" sudo -i -u $USER $REVISION \
EXTERNAL_TRUNK_PATH="${FLAGS_trunk}" "$@"
# Remove trap and explicitly unmount # Remove trap and explicitly unmount
trap - EXIT trap - EXIT
teardown_env teardown_env