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 # 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 Loading... |
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 | 33 if [[ $FLAGS_board =~ [_\ ] ]] ; then |
34 error "--board name must not contain an underscore (_)." | 34 error "--board name must not contain an underscore (_) or a space ( )." |
35 exit 1 | 35 exit 1 |
36 fi | 36 fi |
37 | 37 |
38 if [[ "$FLAGS_variant" =~ "_" ]] ; then | 38 if [[ $FLAGS_variant =~ [_\ ] ]] ; then |
39 error "--variant name must not contain an underscore (_)." | 39 error "--variant name must not contain an underscore (_) or a space ( )." |
40 exit 1 | 40 exit 1 |
41 fi | 41 fi |
42 | 42 |
43 # | 43 # |
44 # Check for chromeos-overlay. | 44 # Check for chromeos-overlay. |
45 # | 45 # |
46 CHROMEOS_OVERLAY="${SRC_ROOT}/private-overlays/chromeos-overlay" | 46 CHROMEOS_OVERLAY="${SRC_ROOT}/private-overlays/chromeos-overlay" |
47 | 47 |
48 if [ -d "${CHROMEOS_OVERLAY}" ]; then | 48 if [ -d "${CHROMEOS_OVERLAY}" ]; then |
49 echo "${CHROMEOS_OVERLAY}" | 49 echo "${CHROMEOS_OVERLAY}" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 fi | 97 fi |
98 fi | 98 fi |
99 fi | 99 fi |
100 | 100 |
101 # | 101 # |
102 # Finally, add in any user requested board overlays. | 102 # Finally, add in any user requested board overlays. |
103 # | 103 # |
104 if [ -d "${FLAGS_board_overlay}" ] ; then | 104 if [ -d "${FLAGS_board_overlay}" ] ; then |
105 echo "${FLAGS_board_overlay}" | 105 echo "${FLAGS_board_overlay}" |
106 fi | 106 fi |
OLD | NEW |