summaryrefslogtreecommitdiffstats
path: root/travis/detect-what-to-build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'travis/detect-what-to-build.sh')
-rwxr-xr-xtravis/detect-what-to-build.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/travis/detect-what-to-build.sh b/travis/detect-what-to-build.sh
index 3119e01ef61..4387b6e4334 100755
--- a/travis/detect-what-to-build.sh
+++ b/travis/detect-what-to-build.sh
@@ -16,9 +16,9 @@ FILES=$(for C in $COMMITS; do JSON=$(curl -sLf https://api.github.com/repos/$TRA
if [[ -z $FILES ]]; then
SHOULD_BUILD=all
-elif ! grep -v -E "(.h|.hh|.hxx|.c|.cpp|.cxx)$" <<< "$FILES"; then
+elif ! grep -v -E "(.h|.hh|.hxx|.c|.cpp|.cxx)$" <<< "$FILES" &> /dev/null; then
SHOULD_BUILD=cpp
-elif ! grep -v -E "(.java)$" <<< "$FILES"; then
+elif ! grep -v -E "(.java)$" <<< "$FILES" &> /dev/null; then
SHOULD_BUILD=java
else
SHOULD_BUILD=all