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