download_git() { local reponame="$(basename "$1")" local dir="$dir_source/$name/$_func_reponame-$2" if [ ! -d "$dir" ]; then rm -rf "$dir" git clone --recursive --depth=1 -b "v$2" "$1" "$dir" else cd "$dir" git checkout "tags/v$2" cd "$OLDPWD" fi getfile "$reponame-$2" }