Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(853)

Side by Side Diff: build_image

Issue 6417001: build_image: use string comparison for comparing strings (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # Script to build a bootable keyfob-based chromeos system image from within 7 # Script to build a bootable keyfob-based chromeos system image from within
8 # a chromiumos setup. This assumes that all needed packages have been built into 8 # a chromiumos setup. This assumes that all needed packages have been built into
9 # the given target's root with binary packages turned on. This script will 9 # the given target's root with binary packages turned on. This script will
10 # build the Chrome OS image using only pre-built binary packages. 10 # build the Chrome OS image using only pre-built binary packages.
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 # Turn die on error back on. 351 # Turn die on error back on.
352 set -e 352 set -e
353 } 353 }
354 354
355 delete_prompt() { 355 delete_prompt() {
356 echo "An error occurred in your build so your latest output directory" \ 356 echo "An error occurred in your build so your latest output directory" \
357 "is invalid." 357 "is invalid."
358 358
359 # Only prompt if both stdin and stdout are a tty. If either is not a tty, 359 # Only prompt if both stdin and stdout are a tty. If either is not a tty,
360 # then the user may not be present, so we shouldn't bother prompting. 360 # then the user may not be present, so we shouldn't bother prompting.
361 if tty -s && tty -s <&1 && [ "${USER}" -ne 'chrome-bot' ]; then 361 if tty -s && tty -s <&1 && [ "${USER}" != 'chrome-bot' ]; then
362 read -p "Would you like to delete the output directory (y/N)? " SURE 362 read -p "Would you like to delete the output directory (y/N)? " SURE
363 SURE="${SURE:0:1}" # Get just the first character. 363 SURE="${SURE:0:1}" # Get just the first character.
364 else 364 else
365 SURE="y" 365 SURE="y"
366 echo "Running in non-interactive mode so deleting output directory." 366 echo "Running in non-interactive mode so deleting output directory."
367 fi 367 fi
368 if [ "${SURE}" == "y" ] ; then 368 if [ "${SURE}" == "y" ] ; then
369 sudo rm -rf "${OUTPUT_DIR}" 369 sudo rm -rf "${OUTPUT_DIR}"
370 echo "Deleted ${OUTPUT_DIR}" 370 echo "Deleted ${OUTPUT_DIR}"
371 else 371 else
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
839 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}" 839 echo "Developer image created as ${DEVELOPER_IMAGE_NAME}"
840 fi 840 fi
841 841
842 print_time_elapsed 842 print_time_elapsed
843 843
844 echo "To copy to USB keyfob, do something like:" 844 echo "To copy to USB keyfob, do something like:"
845 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX" 845 echo " ./image_to_usb.sh --from=${OUTSIDE_OUTPUT_DIR} --to=/dev/sdX"
846 echo "To convert to VMWare image, INSIDE the chroot, do something like:" 846 echo "To convert to VMWare image, INSIDE the chroot, do something like:"
847 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}" 847 echo " ./image_to_vm.sh --from=${OUTSIDE_OUTPUT_DIR} --board=${BOARD}"
848 echo "from the scripts directory where you entered the chroot." 848 echo "from the scripts directory where you entered the chroot."
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698