| 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 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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 else | 160 else |
| 161 echo "Generating full update" | 161 echo "Generating full update" |
| 162 | 162 |
| 163 trap cleanup INT TERM EXIT | 163 trap cleanup INT TERM EXIT |
| 164 DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2) | 164 DST_KERNEL=$(extract_partition_to_temp_file "$FLAGS_image" 2) |
| 165 patch_kernel "$FLAGS_image" "$DST_KERNEL" | 165 patch_kernel "$FLAGS_image" "$DST_KERNEL" |
| 166 DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3) | 166 DST_ROOT=$(extract_partition_to_temp_file "$FLAGS_image" 3) |
| 167 | 167 |
| 168 GENERATOR="$(dirname "$0")/mk_memento_images.sh" | 168 GENERATOR="$(dirname "$0")/mk_memento_images.sh" |
| 169 | 169 |
| 170 "$GENERATOR" "$DST_KERNEL" "$DST_ROOT" | 170 CROS_GENERATE_UPDATE_PAYLOAD_CALLED=1 "$GENERATOR" "$DST_KERNEL" "$DST_ROOT" |
| 171 mv "$(dirname "$DST_KERNEL")/update.gz" "$FLAGS_output" | 171 mv "$(dirname "$DST_KERNEL")/update.gz" "$FLAGS_output" |
| 172 | 172 |
| 173 trap - INT TERM EXIT | 173 trap - INT TERM EXIT |
| 174 cleanup noexit | 174 cleanup noexit |
| 175 echo "Done generating full update." | 175 echo "Done generating full update." |
| 176 fi | 176 fi |
| OLD | NEW |