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

Side by Side Diff: src/scripts/mod_image_for_test.sh

Issue 1572012: Make mod_image_for_test work with default args (Closed)
Patch Set: Created 10 years, 8 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
« 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 modify a keyfob-based chromeos system image for testability. 7 # Script to modify a keyfob-based chromeos system image for testability.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
(...skipping 18 matching lines...) Expand all
29 # No board, no default and no image set then we can't find the image 29 # No board, no default and no image set then we can't find the image
30 if [ -z $FLAGS_image ] && [ -z $FLAGS_board ] ; then 30 if [ -z $FLAGS_image ] && [ -z $FLAGS_board ] ; then
31 setup_board_warning 31 setup_board_warning
32 echo "*** mod_image_for_test failed. No board set and no image set" 32 echo "*** mod_image_for_test failed. No board set and no image set"
33 exit 1 33 exit 1
34 fi 34 fi
35 35
36 # We have a board name but no image set. Use image at default location 36 # We have a board name but no image set. Use image at default location
37 if [ -z $FLAGS_image ] ; then 37 if [ -z $FLAGS_image ] ; then
38 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}" 38 IMAGES_DIR="${DEFAULT_BUILD_ROOT}/images/${FLAGS_board}"
39 FILENAME="chromiumos_test_image.bin" 39 FILENAME="chromiumos_image.bin"
40 FLAGS_image="${IMAGES_DIR}/$(ls -t $IMAGES_DIR 2>&-| head -1)/${FILENAME}" 40 FLAGS_image="${IMAGES_DIR}/$(ls -t $IMAGES_DIR 2>&-| head -1)/${FILENAME}"
41 fi 41 fi
42 42
43 # Abort early if we can't find the image 43 # Abort early if we can't find the image
44 if [ ! -f $FLAGS_image ] ; then 44 if [ ! -f $FLAGS_image ] ; then
45 echo "No image found at $FLAGS_image" 45 echo "No image found at $FLAGS_image"
46 exit 1 46 exit 1
47 fi 47 fi
48 48
49 # Make sure anything mounted in the rootfs is cleaned up ok on exit. 49 # Make sure anything mounted in the rootfs is cleaned up ok on exit.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 ${ROOT_FS_DIR}/usr/local/manufacturing/qualified_components 142 ${ROOT_FS_DIR}/usr/local/manufacturing/qualified_components
143 else 143 else
144 echo "No qualified component file found at: ${FLAGS_qualdb}" 144 echo "No qualified component file found at: ${FLAGS_qualdb}"
145 exit 1 145 exit 1
146 fi 146 fi
147 fi 147 fi
148 148
149 cleanup 149 cleanup
150 trap - EXIT 150 trap - EXIT
151 151
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