blob: a67383a67abf4bc91aa823e3e2e2a906369c74db [file] [log] [blame]
#!/bin/bash
#Clone Horizon for running tests
set -ex
GERRIT_SCHEME=${GERRIT_SCHEME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\1|p')}
GERRIT_NAME=${GERRIT_NAME:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\2|p')}
GERRIT_HOST_PORT=${GERRIT_HOST_PORT:-$(git remote -v | sed -n -e 's|^origin[[:space:]]\+\([[:alpha:]]\+\)://\([a-z0-9\-]\+\)@\([a-z.:0-9]\+\)/.*(fetch)$|\3|p')}
HORIZON_LIB_REPO="${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST_PORT}/packaging/sources/horizon"
REQUIREMENTS_REPO="${GERRIT_SCHEME}://${GERRIT_NAME}@${GERRIT_HOST_PORT}/packaging/sources/requirements"
git clone ${HORIZON_LIB_REPO}
cd horizon/ ; git checkout origin/mcp/ussuri
git clone ${REQUIREMENTS_REPO}
cd requirements/ ; git checkout origin/mcp/ussuri