copy_buildsync.sh: simplify find clean up

Use find options to process everything rather than running through
grep/sort/tr/xargs.
This commit is contained in:
Mike Frysinger 2016-03-20 17:55:08 -04:00
parent 6325704c08
commit 867545ebd8

View file

@ -74,11 +74,9 @@ copy_arch_to_outgoing() {
fail=1
fi
done
find ${outdir} -mindepth 1 -type d \
| egrep -v current \
| sort -r \
| tr '\n' '\0' \
| xargs -0 --no-run-if-empty rmdir --ignore-fail-on-non-empty
find "${outdir}" \
-depth -mindepth 1 -type d \
-exec rmdir --ignore-fail-on-non-empty {} +
}
process_arch() {