| 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" | 266 "${LAST_CHANGE}/${HWQUAL_NAME}.tar.bz2" |
| 267 fi | 267 fi |
| 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 $(readlink -f ../../../..) -b ${FLAGS_board}" | 276 prebuilt_cmd="$prebuilt_cmd -p $(readlink -f ../../../../build/chromiumos)" |
| 277 prebuilt_cmd="$prebuilt_cmd -b ${FLAGS_board}" |
| 277 | 278 |
| 278 if [ "${FLAGS_BOARD}" == "x86-generic" ] | 279 if [ "${FLAGS_BOARD}" == "x86-generic" ] |
| 279 then | 280 then |
| 280 prebuilt_cmd="$prebuilt_cmd --sync-host" | 281 prebuilt_cmd="$prebuilt_cmd --sync-host" |
| 281 fi | 282 fi |
| 282 | 283 |
| 283 echo "Running $prebuilt_cmd" | 284 echo "Running $prebuilt_cmd" |
| 284 $prebuilt_cmd | 285 $prebuilt_cmd |
| 285 fi | 286 fi |
| 286 | 287 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 312 if [ $FLAGS_keep_max -gt 0 ] | 313 if [ $FLAGS_keep_max -gt 0 ] |
| 313 then | 314 then |
| 314 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." | 315 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." |
| 315 cd "$FLAGS_to" | 316 cd "$FLAGS_to" |
| 316 # +2 because line numbers start at 1 and need to skip LATEST file | 317 # +2 because line numbers start at 1 and need to skip LATEST file |
| 317 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` | 318 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` |
| 318 cd - | 319 cd - |
| 319 fi | 320 fi |
| 320 | 321 |
| 321 echo "Done." | 322 echo "Done." |
| OLD | NEW |