diff options
| author | 2018-09-14 21:55:58 -0700 | |
|---|---|---|
| committer | 2018-09-14 21:55:58 -0700 | |
| commit | 57a4bae7c3c79449fcb271375c8e3474a329f716 (patch) | |
| tree | 5b6a7a7ed50df10cf22506add4b954651eb53e89 | |
| parent | 65e63ce0de5107ed95060b26e9fb02a5b637249c (diff) | |
| parent | daabcae9557b085d7b9d3b1945753718b734f332 (diff) | |
Merge "Don't fail if there are no comments."
am: daabcae955
Change-Id: I7d8139a98913ae17491f73314bd426287374c270
| -rwxr-xr-x | tools/hiddenapi/sort_api.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hiddenapi/sort_api.sh b/tools/hiddenapi/sort_api.sh index bdcc8076dde1..76a2f2d6eba1 100755 --- a/tools/hiddenapi/sort_api.sh +++ b/tools/hiddenapi/sort_api.sh @@ -12,8 +12,8 @@ readarray A < "$source_list" # Sort IFS=$'\n' # Stash away comments -C=( $(grep -E '^#' <<< "${A[*]}") ) -A=( $(grep -v -E '^#' <<< "${A[*]}") ) +C=( $(grep -E '^#' <<< "${A[*]}" || :) ) +A=( $(grep -v -E '^#' <<< "${A[*]}" || :) ) # Sort entries A=( $(LC_COLLATE=C sort -f <<< "${A[*]}") ) A=( $(uniq <<< "${A[*]}") ) |