blob: 8c6f2636db15147dd26715232098dff3f50d7571 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
# clone_single_branch is intended for use when we only want a small part of a big repository
# for immediate use.
# This is especially true for projects which do not release tarballs.
# This function would normally be used in the PRE_BUILD script,
# in which case DOWNLOAD should simply be 'true'
# VERSION can be either a branch name or a tag
base_clone_single_branch() {
cd $BUILD_DIRECTORY
if [[ -d $3 ]];then
message "${PROBLEM_COLOR}$3 already exists!\n$DEFAULT_COLOR"
false
else
message "${MESSAGE_COLOR}Cloning into $3\n$DEFAULT_COLOR"
git clone -q --depth=1 --single-branch -b $1 $2 $3
fi
}
clone_single_branch() {
base_clone_single_branch $VERSION $SOURCE_URL $SPELL
}
|