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

Side by Side Diff: bin/cros_overlay_list

Issue 2878077: Add checks that the board and variant names don't contain underscores. (Closed) Base URL: ssh://git@chromiumos-git/crosutils.git
Patch Set: Created 10 years, 4 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
« 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 constants. This should be the first executable line.
10 # The path to common.sh should be relative to your script's location. 10 # The path to common.sh should be relative to your script's location.
(...skipping 12 matching lines...) Expand all
23 23
24 # Only now can we die on error. shflags functions leak non-zero error codes, 24 # Only now can we die on error. shflags functions leak non-zero error codes,
25 # so will die prematurely if 'set -e' is specified before now. 25 # so will die prematurely if 'set -e' is specified before now.
26 set -e 26 set -e
27 27
28 if [ -z "$FLAGS_board" ] ; then 28 if [ -z "$FLAGS_board" ] ; then
29 error "--board required." 29 error "--board required."
30 exit 1 30 exit 1
31 fi 31 fi
32 32
33 if [[ "$FLAGS_board" =~ "_" ]] ; then
34 error "--board name must not contain an underscore (_)."
35 exit 1
36 fi
37
38 if [[ "$FLAGS_variant" =~ "_" ]] ; then
39 error "--variant name must not contain an underscore (_)."
40 exit 1
41 fi
42
33 # 43 #
34 # Check for chromeos-overlay. 44 # Check for chromeos-overlay.
35 # 45 #
36 CHROMEOS_OVERLAY="${SRC_ROOT}/private-overlays/chromeos-overlay" 46 CHROMEOS_OVERLAY="${SRC_ROOT}/private-overlays/chromeos-overlay"
37 47
38 if [ -d "${CHROMEOS_OVERLAY}" ]; then 48 if [ -d "${CHROMEOS_OVERLAY}" ]; then
39 echo "${CHROMEOS_OVERLAY}" 49 echo "${CHROMEOS_OVERLAY}"
40 fi 50 fi
41 51
42 # 52 #
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 fi 97 fi
88 fi 98 fi
89 fi 99 fi
90 100
91 # 101 #
92 # Finally, add in any user requested board overlays. 102 # Finally, add in any user requested board overlays.
93 # 103 #
94 if [ -d "${FLAGS_board_overlay}" ] ; then 104 if [ -d "${FLAGS_board_overlay}" ] ; then
95 echo "${FLAGS_board_overlay}" 105 echo "${FLAGS_board_overlay}"
96 fi 106 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