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

Side by Side Diff: host/cros_workon

Issue 6812022: Correct a typo in 'cros_workon' and make the command help look nicer (Closed) Base URL: ssh://gitrw.chromium.org:9222/dev-util.git@master
Patch Set: Fix up copyright notice to pass precheckin validation. 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
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 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 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 # This script moves ebuilds between 'stable' and 'live' states. 7 # This script moves ebuilds between 'stable' and 'live' states.
8 # By default 'stable' ebuilds point at and build from source at the 8 # By default 'stable' ebuilds point at and build from source at the
9 # last known good commit. Moving an ebuild to 'live' (via cros_workon start) 9 # last known good commit. Moving an ebuild to 'live' (via cros_workon start)
10 # is intended to support development. The current source tip is fetched, 10 # is intended to support development. The current source tip is fetched,
11 # source modified and built using the unstable 'live' (9999) ebuild. 11 # source modified and built using the unstable 'live' (9999) ebuild.
12 12
13 . /usr/lib/crosutils/common.sh || exit 1 13 . /usr/lib/crosutils/common.sh || exit 1
14 14
15 # Script must be run inside the chroot 15 # Script must be run inside the chroot
16 get_default_board 16 get_default_board
17 17
18 DEFINE_string board "${DEFAULT_BOARD}" \ 18 DEFINE_string board "${DEFAULT_BOARD}" \
19 "The board to set package keywords for." 19 "The board to set package keywords for."
20 DEFINE_boolean host "${FLAGS_FALSE}" \ 20 DEFINE_boolean host "${FLAGS_FALSE}" \
21 "Uses the host instead of board" 21 "Uses the host instead of board"
22 DEFINE_string command "git status" \ 22 DEFINE_string command "git status" \
23 "The command to be run by forall." 23 "The command to be run by forall."
24 DEFINE_boolean all "${FLAGS_FALSE}" \ 24 DEFINE_boolean all "${FLAGS_FALSE}" \
25 "Apply to all possible packages for the given command" 25 "Apply to all possible packages for the given command"
26 26
27 FLAGS_HELP="usage: $0 <command> [flags] [<list of packages>|--all] 27 FLAGS_HELP="usage: $0 <command> [flags] [<list of packages>|--all]
28 commands: 28 commands:
29 start: Moves an ebuild to live (intended to support development) 29 start: Moves an ebuild to live (intended to support development)
30 stop: Moves an ebuild to stable (use last known good) 30 stop: Moves an ebuild to stable (use last known good)
31 list: List of live ebuilds (workon ebuilds if --all) 31 list: List of live ebuilds (workon ebuilds if --all)
32 list-all: List all of the live ebuilds for all setup boards 32 list-all: List all of the live ebuilds for all setup boards
33 iterate: For each ebuild, cd to the source dir and run a commond" 33 iterate: For each ebuild, cd to the source dir and run a command"
34 FLAGS "$@" || { [ "${FLAGS_help}" = "${FLAGS_TRUE}" ] && exit 0; } || exit 1 34 FLAGS "$@" || { [ "${FLAGS_help}" = "${FLAGS_TRUE}" ] && exit 0; } || exit 1
35 eval set -- "${FLAGS_ARGV}" 35 eval set -- "${FLAGS_ARGV}"
36 36
37 37
38 # eat the workon command keywords: start, stop or list. 38 # eat the workon command keywords: start, stop or list.
39 WORKON_CMD=$1 39 WORKON_CMD=$1
40 shift 40 shift
41 41
42 # Board dir config 42 # Board dir config
43 43
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 273
274 case ${WORKON_CMD} in 274 case ${WORKON_CMD} in
275 start) ebuild_to_live "${ATOM_LIST}" ;; 275 start) ebuild_to_live "${ATOM_LIST}" ;;
276 stop) ebuild_to_stable "${ATOM_LIST}" ;; 276 stop) ebuild_to_stable "${ATOM_LIST}" ;;
277 list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || \ 277 list) [ ${FLAGS_all} = "${FLAGS_FALSE}" ] && show_live_ebuilds || \
278 show_workon_ebuilds ${BOARD_KEYWORD} ;; 278 show_workon_ebuilds ${BOARD_KEYWORD} ;;
279 list-all) show_all_live_ebuilds ;; 279 list-all) show_all_live_ebuilds ;;
280 iterate) ebuild_iterate "${ATOM_LIST}" ;; 280 iterate) ebuild_iterate "${ATOM_LIST}" ;;
281 *) die "$(basename $0): command '${WORKON_CMD}' not recognized" ;; 281 *) die "$(basename $0): command '${WORKON_CMD}' not recognized" ;;
282 esac 282 esac
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