| 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 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 "--factory" | 152 "--factory" |
| 153 fi | 153 fi |
| 154 | 154 |
| 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 |
| 163 if [ $FLAGS_official_build -eq $FLAGS_TRUE ] |
| 164 then |
| 165 ./enter_chroot.sh -- ./mod_image_for_recovery.sh --board $FLAGS_board \ |
| 166 --image $FLAGS_from/chromiumos_base_image.bin |
| 167 fi |
| 168 |
| 162 # Remove the developer build if test image is also built. | 169 # Remove the developer build if test image is also built. |
| 163 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] ; then | 170 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] ; then |
| 164 rm -f ${SRC_IMAGE} | 171 rm -f ${SRC_IMAGE} |
| 165 fi | 172 fi |
| 166 | 173 |
| 167 # Zip the build | 174 # Zip the build |
| 168 echo "Compressing and archiving build..." | 175 echo "Compressing and archiving build..." |
| 169 cd "$FLAGS_from" | 176 cd "$FLAGS_from" |
| 170 MANIFEST=`ls | grep -v factory` | 177 MANIFEST=`ls | grep -v factory` |
| 171 zip -r "${ZIPFILE}" ${MANIFEST} | 178 zip -r "${ZIPFILE}" ${MANIFEST} |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 243 if [ $FLAGS_keep_max -gt 0 ] | 250 if [ $FLAGS_keep_max -gt 0 ] |
| 244 then | 251 then |
| 245 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 252 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
| 246 cd "$FLAGS_to" | 253 cd "$FLAGS_to" |
| 247 # +2 because line numbers start at 1 and need to skip LATEST file | 254 # +2 because line numbers start at 1 and need to skip LATEST file |
| 248 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 255 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
| 249 cd - | 256 cd - |
| 250 fi | 257 fi |
| 251 | 258 |
| 252 echo "Done." | 259 echo "Done." |
| OLD | NEW |