Skip to content

Commit 248f3de

Browse files
committed
Finalize caching script
Signed-off-by: thepetk <[email protected]>
1 parent 1f8feb2 commit 248f3de

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

build-tools/cache_samples.sh

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,14 @@ set -eu
1212
# 2: sampleDir (output directory of the clone command)
1313
# 3: revision (the prefered revision of the git repo we want to clone)
1414
function clone_sample_repo() {
15-
local gitRepository="$1"
16-
local sampleDir="$2"
17-
local revision="$3"
15+
local repoUrl="$1"
16+
local repoOutputDir="$2"
17+
local repoRevision="$3"
1818
if [[ $revision == "null" ]]; then
19-
echo "cloning $gitRepository to $sampleDir"
20-
git clone $gitRepository $sampleDir
19+
git clone $repoUrl $repoOutputDir
2120
else
22-
echo "cloning $gitRepository to $sampleDir with revision $revision"
23-
git clone --single-branch --branch $revision $gitRepository $sampleDir
21+
git clone --single-branch --branch $repoRevision $repoUrl $repoOutputDir
2422
fi
25-
2623
}
2724

2825
# cache_sample takes in a given sample name (e.g. nodejs-basic), and git clones its corresponding repository

0 commit comments

Comments
 (0)