Skip to content

Commit b80244c

Browse files
author
Clement Champetier
committed
Travis: check if we are on Travis when install dependencies
Useful to use the script outside of Travis (Docker...).
1 parent 50c986a commit b80244c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/travis/linux.install.deps.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
# Print commands and their arguments as they are executed.
44
set -x
55

6-
if [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then
6+
# Use TRAVIS_JOB_ID to detect that we are in travis.
7+
# In that case, use a simple check to detect if the cache is already there.
8+
if [ -z ${TRAVIS_JOB_ID} ] || [ ! -d "${DEPENDENCY_INSTALL_PATH}/lib/" ]; then
79

810
if [[ ${DEPENDENCY_NAME} == "ffmpeg" ]]; then
911

0 commit comments

Comments
 (0)