aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2014-08-28 13:39:22 -0400
committerRick Farina (Zero_Chaos) <zerochaos@gentoo.org>2014-08-28 13:39:22 -0400
commit6f206114aa3b978fc7206cd2d329114db461ea55 (patch)
tree0d47d482150e6f886c254ebb76d394dc05071560 /tinderbox/bashrc
parentadjust output for use with portage (diff)
downloadqa-scripts-6f206114aa3b978fc7206cd2d329114db461ea55.tar.gz
qa-scripts-6f206114aa3b978fc7206cd2d329114db461ea55.tar.bz2
qa-scripts-6f206114aa3b978fc7206cd2d329114db461ea55.zip
check ${T}"/logging/* existence before grepping
sometimes there are no files in ${T}"/logging/ and grep makes an ugly error. check for files there before grepping. Fix check to remove portageqa, it seem the opposite of test -s ( file exists and has size greater than zero ) matched when the file doesn't exist... well, that is the opposite after all.
Diffstat (limited to 'tinderbox/bashrc')
-rw-r--r--tinderbox/bashrc6
1 files changed, 4 insertions, 2 deletions
diff --git a/tinderbox/bashrc b/tinderbox/bashrc
index 8533e2b..6d21868 100644
--- a/tinderbox/bashrc
+++ b/tinderbox/bashrc
@@ -108,9 +108,11 @@ tinderbox_postinst_checks() {
SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir mv '{}' "${BUILD_DATA_DIR}" \;
- SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
+ if [ ls "${T}"/logging/* > /dev/null 2>&1 ] ; then
+ SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
+ fi
- if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
+ if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] && [ -f "${BUILD_DATA_DIR}"/portageqa ] ; then
SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
fi