From 6ff8cd3dbfea0689aee21ca935a2c037ebe28cdf Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 3 Jul 2020 10:16:32 +0200 Subject: [PATCH] pkgdep/git: Don't clone nvme-cli-cuse repo if it already exists Change-Id: Ie49ac85b1484cf49017ebe980b4111bb9e00ae76 Signed-off-by: Michal Berger Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3197 Tested-by: SPDK CI Jenkins Community-CI: Mellanox Build Bot Reviewed-by: Karol Latecki Reviewed-by: Jim Harris Reviewed-by: Tomasz Zawadzki --- test/common/config/pkgdep/git | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/common/config/pkgdep/git b/test/common/config/pkgdep/git index 21f010a3cb..87378f4e84 100644 --- a/test/common/config/pkgdep/git +++ b/test/common/config/pkgdep/git @@ -234,7 +234,9 @@ function install_nvmecli() { # Changes required for SPDK are already merged on top of # nvme-cli, however not released yet. # Support for SPDK should be released in nvme-cli >1.11.1 - git clone "https://github.com/linux-nvme/nvme-cli.git" "$GIT_REPOS/nvme-cli-cuse" + if [[ ! -d $GIT_REPOS/nvme-cli-cuse ]]; then + git clone "https://github.com/linux-nvme/nvme-cli.git" "$GIT_REPOS/nvme-cli-cuse" + fi git -C "$GIT_REPOS/nvme-cli-cuse" checkout "e770466615096a6d41f038a28819b00bc3078e1d" make -C "$GIT_REPOS/nvme-cli-cuse" sudo mv "$GIT_REPOS/nvme-cli-cuse" /usr/local/src/nvme-cli