Don't fail if one of the package lists expands to an empty list

When a package lists contains only packages protected by a test
that doesn't match for the current run, then Expand_package_list
outputs nothing and the following "grep -v" fails because it
has not filtered anything. Avoid this by protecting the "grep -v"
call with "|| true".
This commit is contained in:
Raphaël Hertzog 2021-01-12 14:48:27 +01:00
parent 831da55c01
commit f13273368a
No known key found for this signature in database
GPG Key ID: 03881DABEBC29AB9
1 changed files with 1 additions and 1 deletions

View File

@ -71,7 +71,7 @@ do
then then
# Generating package list # Generating package list
Expand_packagelist "$(basename ${LIST})" "config/package-lists" \ Expand_packagelist "$(basename ${LIST})" "config/package-lists" \
| grep -v '^#' >> chroot/root/packages.chroot | grep -v '^#' >> chroot/root/packages.chroot || true
fi fi
done done