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

Side by Side Diff: scripts/image_signing/set_channel.sh

Issue 6813047: Add a script to arbitrarily change channels on image (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/vboot_reference.git@master
Patch Set: Created 9 years, 8 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 | 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
(Empty)
1 #!/bin/bash
2
3 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Changes the channel on a Chrome OS image.
8
9 # Load common constants and variables.
10 . "$(dirname "$0")/common.sh"
11
12 set -e
13
14 if [ $# -ne 3 ]; then
15 cat <<EOF
16 Usage: $PROG <image.bin> <from_channel> <to_channel>
scottz-goog 2011/04/08 19:18:12 Why do we need to know the from channel? Do we rea
gauravsh 2011/04/08 19:24:51 Mainly because of the way it does the change.
17
18 <image.bin>: Path to image.
19 <from_channel>: The current channel of the image.
20 <to_channel>: The new channel of the image.
21 EOF
22 exit 1
23 fi
24
25 main() {
26 local image=$1
27 local from=$2
28 local to=$3
29
30 rootfs=$(make_temp_dir)
31 mount_image_partition "${image}" 3 "${rootfs}"
32 sed -i "s/\b${from}\b/${to}/" "${rootfs}/etc/lsb-release" &&
scottz-goog 2011/04/08 19:18:12 am I missing something? Why aren't we just calling
gauravsh 2011/04/08 19:24:51 Because the channel also appears in CHROMEOS_RELEA
33 echo "Channel change successful."
34
35 cat "$rootfs/etc/lsb-release"
36 }
37
38 main "$@"
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