| 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 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 | 268 |
| 269 | 269 |
| 270 if [ $FLAGS_prebuilt_upload -eq $FLAGS_TRUE ] | 270 if [ $FLAGS_prebuilt_upload -eq $FLAGS_TRUE ] |
| 271 then | 271 then |
| 272 # Construct prebuilt upload command. | 272 # Construct prebuilt upload command. |
| 273 # This will upload prebuilt packages to Google Storage. | 273 # This will upload prebuilt packages to Google Storage. |
| 274 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" | 274 prebuilt_cmd="${SCRIPTS_DIR}/prebuilt.py" |
| 275 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" | 275 prebuilt_cmd="$prebuilt_cmd -u gs://chromeos-prebuilt --git-sync -V master" |
| 276 prebuilt_cmd="$prebuilt_cmd -p ${GCLIENT_ROOT} -b ${FLAGS_board}" | 276 prebuilt_cmd="$prebuilt_cmd -p ${GCLIENT_ROOT} -b ${FLAGS_board}" |
| 277 | 277 |
| 278 if [ "${FLAGS_BOARD}" == "x86-generic" ] | 278 if [ "${FLAGS_board}" == "x86-generic" ] |
| 279 then | 279 then |
| 280 prebuilt_cmd="$prebuilt_cmd --sync-host" | 280 prebuilt_cmd="$prebuilt_cmd --sync-host" |
| 281 fi | 281 fi |
| 282 | 282 |
| 283 echo "Running $prebuilt_cmd" | 283 echo "Running $prebuilt_cmd" |
| 284 $prebuilt_cmd | 284 $prebuilt_cmd |
| 285 fi | 285 fi |
| 286 | 286 |
| 287 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" | 287 gsutil_archive "${ZIPFILE}" "${LAST_CHANGE}/${FLAGS_zipname}" |
| 288 | 288 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 312 if [ $FLAGS_keep_max -gt 0 ] | 312 if [ $FLAGS_keep_max -gt 0 ] |
| 313 then | 313 then |
| 314 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 314 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
| 315 cd "$FLAGS_to" | 315 cd "$FLAGS_to" |
| 316 # +2 because line numbers start at 1 and need to skip LATEST file | 316 # +2 because line numbers start at 1 and need to skip LATEST file |
| 317 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 317 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
| 318 cd - | 318 cd - |
| 319 fi | 319 fi |
| 320 | 320 |
| 321 echo "Done." | 321 echo "Done." |
| OLD | NEW |