aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-03-20 17:55:08 -0400
committerMike Frysinger <vapier@gentoo.org>2016-03-20 17:55:08 -0400
commit867545ebd8fb51535dd2a715aac033830d29f112 (patch)
tree9bb41cfa3891968e1c05c64d12d3dc244ddfb3bc /scripts
parentcopy_buildsync.sh: convert input copying logic to a func (diff)
downloadreleng-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-xscripts/copy_buildsync.sh8
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() {