diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-03-20 17:55:08 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-03-20 17:55:08 -0400 |
commit | 867545ebd8fb51535dd2a715aac033830d29f112 (patch) | |
tree | 9bb41cfa3891968e1c05c64d12d3dc244ddfb3bc /scripts | |
parent | copy_buildsync.sh: convert input copying logic to a func (diff) | |
download | releng-867545ebd8fb51535dd2a715aac033830d29f112.tar.gz releng-867545ebd8fb51535dd2a715aac033830d29f112.tar.bz2 releng-867545ebd8fb51535dd2a715aac033830d29f112.zip |
copy_buildsync.sh: simplify find clean up
Use find options to process everything rather than running through
grep/sort/tr/xargs.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/copy_buildsync.sh | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/copy_buildsync.sh b/scripts/copy_buildsync.sh index 927a1fdf..b4351cbc 100755 --- a/scripts/copy_buildsync.sh +++ b/scripts/copy_buildsync.sh @@ -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() { |