diff options
author | D. Johnson <fenris02@fedoraproject.org> | 2013-10-12 00:35:19 -0500 |
---|---|---|
committer | D. Johnson <fenris02@fedoraproject.org> | 2013-10-12 00:35:19 -0500 |
commit | 15c69d4201f1b43d315780409392f8707a03cf3c (patch) | |
tree | 39d7d9c70f904c09dc6bdffcac710db123bccfc1 | |
parent | edb9696f3a1cf63509f76a593581d96898246e4e (diff) | |
download | cleanup-15c69d4201f1b43d315780409392f8707a03cf3c.tar.gz cleanup-15c69d4201f1b43d315780409392f8707a03cf3c.tar.xz cleanup-15c69d4201f1b43d315780409392f8707a03cf3c.zip |
Limit each output file to 1000 lines to prevent excessive flooding.
-rwxr-xr-x | rpm-verify.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/rpm-verify.sh b/rpm-verify.sh index 2b50881..9225567 100755 --- a/rpm-verify.sh +++ b/rpm-verify.sh @@ -125,7 +125,13 @@ for fp in ${TMPDIR}/{YUM-REPOLIST,URGENT-REVIEW,REVIEW-CONFIGS,PROBLEM-PACKAGES, ===== $fp =============================================================================== EOT - /bin/cat $fp >> ${TMPDIR}/fpaste-output_${DS}.txt + ### Limit each output file to 1000 lines to prevent excessive flooding. + WCL=$(/usr/bin/wc -l $fp |/usr/bin/gawk '{print$1}') + if [ $WCL -gt 1000 ]; then + echo "*** File $fp truncated to 1000 lines, was $WCL lines. ***" + echo "*** File $fp truncated to 1000 lines, was $WCL lines. ***" >> ${TMPDIR}/fpaste-output_${DS}.txt + fi + /usr/bin/head -n1000 $fp >> ${TMPDIR}/fpaste-output_${DS}.txt fi done echo fpaste ${TMPDIR}/fpaste-output_${DS}.txt |