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

Side by Side Diff: bin/cros_overlay_list

Issue 6293021: Update cros_overlay_list to work from either src/scripts or /usr/bin. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/crosutils.git@master
Patch Set: Created 9 years, 11 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) 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 # This script generates the list of board overlays and variants. 7 # This script generates the list of board overlays and variants.
8 8
9 # Load common constants. This should be the first executable line. 9 # Load common CrOS utilities. Inside the chroot this file is installed in
10 # The path to common.sh should be relative to your script's location. 10 # /usr/lib/crosutils. Outside the chroot we find it relative to the scripts
11 . "$(dirname "$0")/../common.sh" 11 # location.
12 common_paths="/usr/lib/crosutils $(dirname "$0")/.."
13
14 for path in ${common_paths} ; do
15 if [ -f "${path}/common.sh" ] ; then
16 COMMON_SH="${path}/common.sh"
17 break
18 fi
19 done
20
21 if [ -z "${COMMON_SH}" ] ; then
22 error "common.sh not found in search path (${common_paths})"
23 exit 1
24 fi
25
26 . "${COMMON_SH}"
Greg Spencer (Chromium) 2011/01/26 22:30:45 So, in my CL for cleaning things up, I've used the
robotboy 2011/01/26 23:07:38 I think I prefer to have the error checking and re
Greg Spencer (Chromium) 2011/01/26 23:47:46 No, that's fine. I might even adopt some of it fo
12 27
13 get_default_board 28 get_default_board
14 29
15 # Flags 30 # Flags
16 DEFINE_string board "$DEFAULT_BOARD" "The name of the board to set up." 31 DEFINE_string board "$DEFAULT_BOARD" "The name of the board to set up."
17 DEFINE_string board_overlay "" "Location of the board overlay." 32 DEFINE_string board_overlay "" "Location of the board overlay."
18 DEFINE_boolean primary_only ${FLAGS_FALSE} \ 33 DEFINE_boolean primary_only ${FLAGS_FALSE} \
19 "Only return the path to the board's primary overlay. (Default: false)" 34 "Only return the path to the board's primary overlay. (Default: false)"
20 DEFINE_string variant "" "Board variant." 35 DEFINE_string variant "" "Board variant."
21 36
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 fi 149 fi
135 fi 150 fi
136 fi 151 fi
137 152
138 # 153 #
139 # Finally, add in any user requested board overlays. 154 # Finally, add in any user requested board overlays.
140 # 155 #
141 if [ -d "${FLAGS_board_overlay}" ] ; then 156 if [ -d "${FLAGS_board_overlay}" ] ; then
142 echo "${FLAGS_board_overlay}" 157 echo "${FLAGS_board_overlay}"
143 fi 158 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