diff options
| author | 2018-09-14 22:05:08 -0700 | |
|---|---|---|
| committer | 2018-09-14 22:05:08 -0700 | |
| commit | c73d03a53a7cea1cc575625115fb82de9ac1ac77 (patch) | |
| tree | c108bb7555acf45c0d354bbd8289a5597c68ebfc | |
| parent | dfca0da00e802fdd7c30b6942ad0ebeb12049aee (diff) | |
| parent | 57a4bae7c3c79449fcb271375c8e3474a329f716 (diff) | |
Merge "Don't fail if there are no comments." am: daabcae955
am: 57a4bae7c3
Change-Id: I6e672e4edbd4a0e06edd1414c792186f38e4ffa3
| -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[*]}") ) |