You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
368 B
15 lines
368 B
download_git() {
|
|
_func_reponame="$(basename "$1")"
|
|
_func_dir="$dir_source/$name/$_func_reponame-$2"
|
|
|
|
if [ ! -d "$_func_dir" ]; then
|
|
rm -rf "$_func_dir"
|
|
git clone --recursive --depth=1 -b "v$2" "$1" "$_func_dir"
|
|
else
|
|
cd "$_func_dir"
|
|
git checkout "tags/v$2"
|
|
cd "$OLDPWD"
|
|
fi
|
|
|
|
getfile "$_func_reponame-$2"
|
|
}
|
|
|