| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 | 2 |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 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 archive build results. Used by the buildbots. | 7 # Script to archive build results. Used by the buildbots. |
| 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 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 if [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] | 155 if [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] |
| 156 then | 156 then |
| 157 echo "Modifying image for factory install" | 157 echo "Modifying image for factory install" |
| 158 do_chroot_mod "${FLAGS_from}/chromiumos_factory_install_image.bin" \ | 158 do_chroot_mod "${FLAGS_from}/chromiumos_factory_install_image.bin" \ |
| 159 "--factory_install" | 159 "--factory_install" |
| 160 fi | 160 fi |
| 161 | 161 |
| 162 # Modify for recovery | 162 # Modify for recovery |
| 163 if [ $FLAGS_official_build -eq $FLAGS_TRUE ] | 163 if [ $FLAGS_official_build -eq $FLAGS_TRUE ] |
| 164 then | 164 then |
| 165 BUILDVER=$(ls -t1 $IMAGES_DIR/$FLAGS_board 2>&-| head -1) |
| 166 CHROOT_IMAGE_DIR=/home/$USER/trunk/src/build/images/$FLAGS_board/$BUILDVER |
| 165 ./enter_chroot.sh -- ./mod_image_for_recovery.sh --board $FLAGS_board \ | 167 ./enter_chroot.sh -- ./mod_image_for_recovery.sh --board $FLAGS_board \ |
| 166 --image $FLAGS_from/chromiumos_base_image.bin | 168 --image $CHROOT_IMAGE_DIR/chromiumos_base_image.bin |
| 167 fi | 169 fi |
| 168 | 170 |
| 169 # Remove the developer build if test image is also built. | 171 # Remove the developer build if test image is also built. |
| 170 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] ; then | 172 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] ; then |
| 171 rm -f ${SRC_IMAGE} | 173 rm -f ${SRC_IMAGE} |
| 172 fi | 174 fi |
| 173 | 175 |
| 174 # Zip the build | 176 # Zip the build |
| 175 echo "Compressing and archiving build..." | 177 echo "Compressing and archiving build..." |
| 176 cd "$FLAGS_from" | 178 cd "$FLAGS_from" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 if [ $FLAGS_keep_max -gt 0 ] | 252 if [ $FLAGS_keep_max -gt 0 ] |
| 251 then | 253 then |
| 252 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 254 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
| 253 cd "$FLAGS_to" | 255 cd "$FLAGS_to" |
| 254 # +2 because line numbers start at 1 and need to skip LATEST file | 256 # +2 because line numbers start at 1 and need to skip LATEST file |
| 255 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 257 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
| 256 cd - | 258 cd - |
| 257 fi | 259 fi |
| 258 | 260 |
| 259 echo "Done." | 261 echo "Done." |
| OLD | NEW |