Enhance travis run script
authormayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 00:34:14 +0000 (02:34 +0200)
committermayeut <mayeut@users.noreply.github.com>
Sat, 12 Sep 2015 00:34:14 +0000 (02:34 +0200)
tools/travis-ci/run.sh

index a1396cfeff07ea3307c91dbcbf9cdd072fc40565..d95475e54666d589e221c94d9a745c4be0776092 100755 (executable)
@@ -10,12 +10,15 @@ set -o pipefail  ## Fail on error in pipe
 # Set-up some variables
 OPJ_SOURCE_DIR=$(cd $(dirname $0)/../.. && pwd)
 
-if [ "${TRAVIS_REPO_SLUG:-}" == "uclouvain/openjpeg" ]; then
-       OPJ_SITE="travis-ci.org"
-       OPJ_DO_SUBMIT=1
+OPJ_DO_SUBMIT=0 # Do not flood cdash
+if [ "${TRAVIS_REPO_SLUG:-}" != "" ]; then
+       OPJ_OWNER=$(echo "${TRAVIS_REPO_SLUG}" | sed 's/\(^.*\)\/.*/\1/')
+       OPJ_SITE="${OPJ_OWNER}.travis-ci.org"
+       if [ "${OPJ_OWNER}" == "uclouvain" ]; then
+               OPJ_DO_SUBMIT=1
+       fi
 else
        OPJ_SITE="$(hostname)"
-       OPJ_DO_SUBMIT=0 # Do not flood cdash
 fi
 
 if [ "${TRAVIS_OS_NAME:-}" == "" ]; then