Switch from sed to grep for extracting packages from sources.patches

grep is much faster than sed in this situation.
parent 9111074f
......@@ -17,8 +17,8 @@ errors="$dd_list.errors"
# Retrieve Debian names of packages from the sources.patches file
# then pass packages to dd-list and handle unknown packages
# (missing in the *_source_Sources files) and other errors
# Using sed is for the extraction is much faster than parsing YAML.
sed -n '/^- debian_name/p' "$sources_patches" | cut -d ' ' -f3 |
# Using grep is for the extraction is much faster than parsing YAML.
grep '^- debian_name: ' "$sources_patches" | cut -d ' ' -f3 |
dd-list --stdin 2>&1 > "$dd_list" |
sed --silent --expression "/^E: Unknown package: / { s///; w $unknown" \
--expression "; b; }; w $errors"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment