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

This commit is contained in:
Treehugger Robot
2018-09-15 02:41:13 +00:00
committed by Gerrit Code Review

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