fix xargs warning
This commit is contained in:
parent
a0e7848fd2
commit
a78a2dfcf8
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ task_delete-old() {
|
|||
task_begin "Deleting packages more than ${keep_versions} versions ago";
|
||||
# Find and delete old package versions
|
||||
export -f __analyse_package_simple;
|
||||
find sources/ -type f -name "*.deb" -print0 | xargs -0 -n1 -P "$(nproc)" -I{} bash -c '__analyse_package_simple "{}"' | sort -k1,2Vr | uniq | awk -v keep_ago=${keep_versions} '{ package=$1; gsub(/^.*\//, "", package); gsub(/_.*+$/, "", package); arch=$1; gsub(/^.*_/, "", arch); gsub(/\.deb$/, "", arch); counts[package arch]++; if(counts[package arch] > keep_ago) print($1); }' | xargs --verbose --no-run-if-empty rm
|
||||
find sources/ -type f -name "*.deb" -print0 | xargs -0 -P "$(nproc)" -I{} bash -c '__analyse_package_simple "{}"' | sort -k1,2Vr | uniq | awk -v keep_ago=${keep_versions} '{ package=$1; gsub(/^.*\//, "", package); gsub(/_.*+$/, "", package); arch=$1; gsub(/^.*_/, "", arch); gsub(/\.deb$/, "", arch); counts[package arch]++; if(counts[package arch] > keep_ago) print($1); }' | xargs --verbose --no-run-if-empty rm
|
||||
# Result resultant broken symlinks
|
||||
find "${dir_repo}" -xtype l -delete -print0 | xargs -0 -n1 echo Deleting;
|
||||
task_end "$?";
|
||||
|
|
Loading…
Reference in a new issue