diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-03-24 15:47:36 +0100 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-03-24 15:53:17 +0100 |
commit | e82881f643d23d945aa0a4e2ce6172878f7c1412 (patch) | |
tree | 208f1a2d4b0f9166c4976e12e342067b9ac86b97 /dev/ci/ci-common.sh | |
parent | 9c80dd80feb1cc2ae6d0dc6e08985d4f51d4f329 (diff) |
[travis] Backport from trunk: VST
Diffstat (limited to 'dev/ci/ci-common.sh')
-rw-r--r-- | dev/ci/ci-common.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/dev/ci/ci-common.sh b/dev/ci/ci-common.sh index 9fdd2504d..2711b7eca 100644 --- a/dev/ci/ci-common.sh +++ b/dev/ci/ci-common.sh @@ -27,11 +27,11 @@ git_checkout() # Allow an optional 4th argument for the commit local _COMMIT=${4:-FETCH_HEAD} - local _DEPTH=${5:-1} + local _DEPTH=$(if [ -z "${4}" ]; then echo "--depth 1"; fi) mkdir -p ${_DEST} ( cd ${_DEST} && \ - if [ ! -d .git ] ; then git clone --depth ${_DEPTH} ${_URL} . ; fi && \ + if [ ! -d .git ] ; then git clone ${_DEPTH} ${_URL} . ; fi && \ echo "Checking out ${_DEST}" && \ git fetch ${_URL} ${_BRANCH} && \ git checkout ${_COMMIT} && \ |