Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Side by Side Diff: src/scripts/archive_build.sh

Issue 2075019: Cleanup of adding pristine image and fixing of symlinks in developer image. (Closed) Base URL: ssh://git@chromiumos-git//chromeos
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/scripts/build_image » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 echo "archive to dir: $OUTDIR" 98 echo "archive to dir: $OUTDIR"
99 echo "archive to file: $ZIPFILE" 99 echo "archive to file: $ZIPFILE"
100 100
101 rm -rf "$OUTDIR" 101 rm -rf "$OUTDIR"
102 mkdir -p "$OUTDIR" 102 mkdir -p "$OUTDIR"
103 103
104 # Modify image for test if flag set. 104 # Modify image for test if flag set.
105 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ] 105 if [ $FLAGS_test_mod -eq $FLAGS_TRUE ]
106 then 106 then
107 echo "Modifying image for test" 107 echo "Modifying image for test"
108 SRC_IMAGE="${FLAGS_from}/chromiumos_image.bin" 108 SRC_IMAGE="${FLAGS_from}/chromiumos_image.bin"
Nick Sanders 2010/05/20 00:56:55 It looks like this is destructive to the image dir
109 cp -f "${SRC_IMAGE}" "${FLAGS_from}/chromiumos_image_bkup.bin"
110 ./enter_chroot.sh -- ./mod_image_for_test.sh --board $FLAGS_board --yes 109 ./enter_chroot.sh -- ./mod_image_for_test.sh --board $FLAGS_board --yes
111 mv "$SRC_IMAGE" "${FLAGS_from}/chromiumos_test_image.bin" 110 mv "$SRC_IMAGE" "${FLAGS_from}/chromiumos_test_image.bin"
112 mv "${FLAGS_from}/chromiumos_image_bkup.bin" "$SRC_IMAGE"
113 cd "${FLAGS_chroot}/build/${FLAGS_board}/usr/local" 111 cd "${FLAGS_chroot}/build/${FLAGS_board}/usr/local"
114 echo "Archiving autotest build artifacts" 112 echo "Archiving autotest build artifacts"
115 tar cjf "${FLAGS_from}/autotest.tar.bz2" autotest 113 tar cjf "${FLAGS_from}/autotest.tar.bz2" autotest
116 fi 114 fi
117 115
118 # Zip the build 116 # Zip the build
119 echo "Compressing and archiving build..." 117 echo "Compressing and archiving build..."
120 cd "$FLAGS_from" 118 cd "$FLAGS_from"
121 zip -r "$ZIPFILE" * 119 zip -r "$ZIPFILE" *
122 cd - 120 cd -
(...skipping 17 matching lines...) Expand all
140 if [ $FLAGS_keep_max -gt 0 ] 138 if [ $FLAGS_keep_max -gt 0 ]
141 then 139 then
142 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." 140 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..."
143 cd "$FLAGS_to" 141 cd "$FLAGS_to"
144 # +2 because line numbers start at 1 and need to skip LATEST file 142 # +2 because line numbers start at 1 and need to skip LATEST file
145 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` 143 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))`
146 cd - 144 cd -
147 fi 145 fi
148 146
149 echo "Done." 147 echo "Done."
OLDNEW
« no previous file with comments | « no previous file | src/scripts/build_image » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698