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

Side by Side Diff: cros_generate_update_payload

Issue 4170003: Use delta_generator from chroot instead of from update_engine directory. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git
Patch Set: Created 10 years, 1 month 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 | Annotate | Revision Log
« 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 generate a Chromium OS update for use by the update engine. 7 # Script to generate a Chromium OS update for use by the update engine.
8 # If a source .bin is specified, the update is assumed to be a delta update. 8 # If a source .bin is specified, the update is assumed to be a delta update.
9 9
10 # Load common constants. This should be the first executable line. 10 # Load common constants. This should be the first executable line.
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 echo "Generating an old-style full update" 161 echo "Generating an old-style full update"
162 else 162 else
163 echo "Generating a new-style full update" 163 echo "Generating a new-style full update"
164 fi 164 fi
165 fi 165 fi
166 166
167 if [ "$DELTA" -eq "$FLAGS_TRUE" -o "$FLAGS_old_style" -eq "$FLAGS_FALSE" ]; then 167 if [ "$DELTA" -eq "$FLAGS_TRUE" -o "$FLAGS_old_style" -eq "$FLAGS_FALSE" ]; then
168 echo "Generating a delta update" 168 echo "Generating a delta update"
169 169
170 # Sanity check that the real generator exists: 170 # Sanity check that the real generator exists:
171 GENERATOR="$(dirname "$0")/../platform/update_engine/delta_generator" 171 GENERATOR="$(which delta_generator)"
172 [ -x "$GENERATOR" ] || die "$GENERATOR doesn't exist, or isn't executable" 172 [ -x "$GENERATOR" ] || die "can't find delta_generator"
173 173
174 trap cleanup INT TERM EXIT 174 trap cleanup INT TERM EXIT
175 if [ "$DELTA" -eq "$FLAGS_TRUE" ]; then 175 if [ "$DELTA" -eq "$FLAGS_TRUE" ]; then
176 if [ "$FLAGS_full_kernel" -eq "$FLAGS_FALSE" ]; then 176 if [ "$FLAGS_full_kernel" -eq "$FLAGS_FALSE" ]; then
177 SRC_KERNEL=$(extract_partition_to_temp_file "$FLAGS_src_image" 2) 177 SRC_KERNEL=$(extract_partition_to_temp_file "$FLAGS_src_image" 2)
178 if [ "$FLAGS_patch_kernel" -eq "$FLAGS_TRUE" ]; then 178 if [ "$FLAGS_patch_kernel" -eq "$FLAGS_TRUE" ]; then
179 patch_kernel "$FLAGS_src_image" "$SRC_KERNEL" 179 patch_kernel "$FLAGS_src_image" "$SRC_KERNEL"
180 fi 180 fi
181 echo md5sum of src kernel: 181 echo md5sum of src kernel:
182 md5sum "$SRC_KERNEL" 182 md5sum "$SRC_KERNEL"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 232
233 GENERATOR="$(dirname "$0")/mk_memento_images.sh" 233 GENERATOR="$(dirname "$0")/mk_memento_images.sh"
234 234
235 CROS_GENERATE_UPDATE_PAYLOAD_CALLED=1 "$GENERATOR" "$DST_KERNEL" "$DST_ROOT" 235 CROS_GENERATE_UPDATE_PAYLOAD_CALLED=1 "$GENERATOR" "$DST_KERNEL" "$DST_ROOT"
236 mv "$(dirname "$DST_KERNEL")/update.gz" "$FLAGS_output" 236 mv "$(dirname "$DST_KERNEL")/update.gz" "$FLAGS_output"
237 237
238 trap - INT TERM EXIT 238 trap - INT TERM EXIT
239 cleanup noexit 239 cleanup noexit
240 echo "Done generating full update." 240 echo "Done generating full update."
241 fi 241 fi
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