diff --git a/README.md b/README.md index dac0370..1dbe8e8 100644 --- a/README.md +++ b/README.md @@ -186,6 +186,9 @@ Setting `VV=1` in your `.travis.yml` configuration for a specific job will run the job with high verbosity, printing every command as it is being executed and switching the dependency builds to higher verbosity. +For local debugging, you may set `CACHEDIR` to change the location for the +dependency builds. [default is `$HOME/.cache`] + ## References: EPICS Modules Using ci-scripts EPICS Base: [pvData](https://github.com/epics-base/pvDataCPP), diff --git a/travis-test.sh b/travis-test.sh index d7205b1..1ddb5c9 100755 --- a/travis-test.sh +++ b/travis-test.sh @@ -39,7 +39,8 @@ SETUP_DIRS=${SETUP_PATH//:/ } SCRIPTDIR=$(dirname $(readlinkf $0))/travis CURDIR="$PWD" -CACHEDIR="$HOME/.cache" +CACHEDIR=${CACHEDIR:-${HOME}/.cache} +[ -e ${CACHEDIR} ] || mkdir -p ${CACHEDIR} echo "Testing contents of utils.sh" diff --git a/travis/build.sh b/travis/build.sh index c6817f5..addf7f1 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -4,7 +4,7 @@ set -e # Set VV in .travis.yml to make scripts verbose [ "$VV" ] && set -x -CACHEDIR="$HOME/.cache" +CACHEDIR=${CACHEDIR:-${HOME}/.cache} eval $(grep "EPICS_BASE=" ${CACHEDIR}/RELEASE.local) export EPICS_BASE diff --git a/travis/prepare.sh b/travis/prepare.sh index 3cb13c2..16f1775 100755 --- a/travis/prepare.sh +++ b/travis/prepare.sh @@ -21,7 +21,8 @@ readlinkf() { perl -MCwd -e 'print Cwd::abs_path shift' "$1"; } SCRIPTDIR=$(dirname $(readlinkf $0)) CURDIR="$PWD" -CACHEDIR="$HOME/.cache" +CACHEDIR=${CACHEDIR:-${HOME}/.cache} +[ -e ${CACHEDIR} ] || mkdir -p ${CACHEDIR} # source functions . $SCRIPTDIR/utils.sh diff --git a/travis/utils.sh b/travis/utils.sh index 46e8466..018bab9 100644 --- a/travis/utils.sh +++ b/travis/utils.sh @@ -1,6 +1,7 @@ # Utility functions for Travis scripts in ci-scripts # # This file is sourced by the executable scripts +# CACHEDIR must be defined and existing before calling these functions # Portable version of 'sed -i' (that MacOS doesn't provide)