Fix comments
This commit is contained in:
parent
f2a1d6c503
commit
942e8a5b47
1 changed files with 9 additions and 4 deletions
|
@ -169,12 +169,17 @@ task_metafiles() {
|
|||
__analyse_package() { dpkg --info "$1" | awk '/^\s*Package:/ { gsub("\\s*Package:\\s*", ""); printf($0 "\t"); } /^\s*Version:/ { gsub("\\s*Version:\\s*", ""); printf($0 "\t"); } /^\s*Description:/ { gsub("\\s*Description:\\s*", ""); print($0); }'; };
|
||||
|
||||
_generate_summary() {
|
||||
# xargs: Generate the TSV records in parallel
|
||||
# sort: Sort on the package name, then version (note the 2V does a *version sort* on column 2)
|
||||
# uniq: Remove duplicates (e.g. due to multiple architectures)
|
||||
# column: Align all the columns nicely - ref https://unix.stackexchange.com/a/468048/64687
|
||||
|
||||
export -f __analyse_package;
|
||||
find "${dir_sources}" -type f -name "*.deb" -print0 | \
|
||||
xargs -0 -n1 -p "$(nproc)" -I{} bash -c 'do_work "{}"' | \ # Generate the TSV records in parallel
|
||||
sort -k1,2V | \ # Sort on the package name, then version (note the 2V does a *version sort* on column 2)
|
||||
uniq | \ # Remove duplicates (e.g. due to multiple architectures)
|
||||
column -t -s "$(printf '\t')"; # Align all the columns nicely - ref https://unix.stackexchange.com/a/468048/64687
|
||||
xargs -0 -n1 -p "$(nproc)" -I{} bash -c 'do_work "{}"' | \
|
||||
sort -k1,2V | \
|
||||
uniq | \
|
||||
column -t -s "$(printf '\t')";
|
||||
}
|
||||
|
||||
task_generate-summary() {
|
||||
|
|
Loading…
Reference in a new issue