Merge "Don't fail if there are no comments."

am: daabcae955

Change-Id: I7d8139a98913ae17491f73314bd426287374c270
This commit is contained in:
Mathew Inwood
2018-09-14 21:55:58 -07:00
committed by android-build-merger

View File

@@ -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[*]}") )