mirror of
https://github.com/sourcegraph/sourcegraph.git
synced 2026-02-06 19:21:50 +00:00
21 lines
411 B
Bash
Executable File
21 lines
411 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -eu
|
|
cd "$(dirname "${BASH_SOURCE[0]}")/../../.."
|
|
DATADIR=$(realpath './dev/codeintel-qa/testdata')
|
|
REPODIR="${DATADIR}/repos"
|
|
|
|
NAME="$1"
|
|
|
|
# Early-out if there's already a dump file
|
|
if [ -d "${REPODIR}/${NAME}" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Ensure target dir exists
|
|
mkdir -p "${REPODIR}"
|
|
|
|
# Clone repo
|
|
pushd "${REPODIR}" || exit 1
|
|
git clone "https://github.com/sourcegraph-testing/${NAME}.git"
|