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

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

Issue 2714005: Change file permissions on factory.zip (Closed) Base URL: http://src.chromium.org/git/chromiumos.git
Patch Set: Created 10 years, 6 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 | no next file » | 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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 echo "Compressing and archiving build..." 158 echo "Compressing and archiving build..."
159 cd "$FLAGS_from" 159 cd "$FLAGS_from"
160 MANIFEST=`ls | grep -v factory` 160 MANIFEST=`ls | grep -v factory`
161 zip -r "${ZIPFILE}" ${MANIFEST} 161 zip -r "${ZIPFILE}" ${MANIFEST}
162 162
163 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \ 163 if [ $FLAGS_factory_test_mod -eq $FLAGS_TRUE ] || \
164 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ] 164 [ $FLAGS_factory_install_mod -eq $FLAGS_TRUE ]
165 then 165 then
166 FACTORY_MANIFEST=`ls | grep factory` 166 FACTORY_MANIFEST=`ls | grep factory`
167 zip -r "${FACTORY_ZIPFILE}" ${FACTORY_MANIFEST} 167 zip -r "${FACTORY_ZIPFILE}" ${FACTORY_MANIFEST}
168 chmod 644 "${FACTORY_ZIPFILE}"
168 fi 169 fi
169 cd - 170 cd -
170 171
171 # Update LATEST file 172 # Update LATEST file
172 echo "$LAST_CHANGE" > "${FLAGS_to}/LATEST" 173 echo "$LAST_CHANGE" > "${FLAGS_to}/LATEST"
173 174
174 # Make sure files are readable 175 # Make sure files are readable
175 chmod 644 "$ZIPFILE" "${FLAGS_to}/LATEST" 176 chmod 644 "$ZIPFILE" "${FLAGS_to}/LATEST"
176 chmod 755 "$OUTDIR" 177 chmod 755 "$OUTDIR"
177 178
178 if [ $FLAGS_test_mod -eq $FLAGS_TRUE -a $FLAGS_official_build -eq $FLAGS_TRUE ] 179 if [ $FLAGS_test_mod -eq $FLAGS_TRUE -a $FLAGS_official_build -eq $FLAGS_TRUE ]
179 then 180 then
180 echo "Creating hwqual archive" 181 echo "Creating hwqual archive"
181 HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}" 182 HWQUAL_NAME="chromeos-hwqual-${FLAGS_board}-${CHROMEOS_VERSION_STRING}"
182 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \ 183 "${SCRIPTS_DIR}/archive_hwqual" --from "${OUTDIR}" \
183 --output_tag "${HWQUAL_NAME}" 184 --output_tag "${HWQUAL_NAME}"
184 fi 185 fi
185 186
186 # Purge old builds if necessary 187 # Purge old builds if necessary
187 if [ $FLAGS_keep_max -gt 0 ] 188 if [ $FLAGS_keep_max -gt 0 ]
188 then 189 then
189 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..." 190 echo "Deleting old builds (all but the newest ${FLAGS_keep_max})..."
190 cd "$FLAGS_to" 191 cd "$FLAGS_to"
191 # +2 because line numbers start at 1 and need to skip LATEST file 192 # +2 because line numbers start at 1 and need to skip LATEST file
192 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))` 193 rm -rf `ls -t1 | tail --lines=+$(($FLAGS_keep_max + 2))`
193 cd - 194 cd -
194 fi 195 fi
195 196
196 echo "Done." 197 echo "Done."
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698