| OLD | NEW |
| 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. |
| 11 . "$(dirname "$0")/common.sh" | 11 . "$(dirname "$0")/common.sh" |
| 12 | 12 |
| 13 # Load functions and constants for chromeos-install | 13 # Load functions and constants for chromeos-install |
| 14 . "$(dirname "$0")/chromeos-common.sh" | 14 . "$(dirname "$0")/chromeos-common.sh" |
| 15 | 15 |
| 16 if [ ${INSIDE_CHROOT} -eq 0 ] ; then | |
| 17 "$(dirname "$0")/enter_chroot.sh" ./mod_image_for_test.sh "$@" | |
| 18 exit 0 | |
| 19 fi | |
| 20 | |
| 21 get_default_board | 16 get_default_board |
| 22 | 17 |
| 23 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" | 18 DEFINE_string board "$DEFAULT_BOARD" "Board for which the image was built" |
| 24 DEFINE_string qualdb "/tmp/run_remote_tests.*" \ | 19 DEFINE_string qualdb "/tmp/run_remote_tests.*" \ |
| 25 "Location of qualified component file" | 20 "Location of qualified component file" |
| 26 DEFINE_string image "" "Location of the rootfs raw image file" | 21 DEFINE_string image "" "Location of the rootfs raw image file" |
| 27 DEFINE_boolean factory $FLAGS_FALSE "Modify the image for manufacturing testing" | 22 DEFINE_boolean factory $FLAGS_FALSE "Modify the image for manufacturing testing" |
| 28 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" "y" | 23 DEFINE_boolean yes $FLAGS_FALSE "Answer yes to all prompts" "y" |
| 29 | 24 |
| 30 # Parse command line | 25 # Parse command line |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" | 145 MOD_FACTORY_ROOT="${GCLIENT_ROOT}/src/scripts/mod_for_factory_scripts" |
| 151 # Run factory setup script to modify the image | 146 # Run factory setup script to modify the image |
| 152 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ | 147 sudo GCLIENT_ROOT="${GCLIENT_ROOT}" ROOT_FS_DIR="${ROOT_FS_DIR}" \ |
| 153 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \ | 148 STATEFUL_DIR="${STATEFUL_DIR}/dev_image" QUALDB="${FLAGS_qualdb}" \ |
| 154 "${MOD_FACTORY_ROOT}/factory_setup.sh" | 149 "${MOD_FACTORY_ROOT}/factory_setup.sh" |
| 155 fi | 150 fi |
| 156 | 151 |
| 157 cleanup | 152 cleanup |
| 158 trap - EXIT | 153 trap - EXIT |
| 159 | 154 |
| OLD | NEW |