Skip to content

Instantly share code, notes, and snippets.

@k-takata
k-takata / dl-patches.sh
Last active August 29, 2015 14:07
Download all patches for Vim 7.4
#!/bin/bash
version=7.4
#unstable=unstable/
unstable=
patch_url=http://ftp.vim.org/pub/vim/${unstable}patches/${version}
# Get start and end version
version_esc=${version//./\\.} # Escape dots
start=$(gawk '{l = gensub(/'${version_esc}'\.([0-9]+)/, "\\1", 1, $2)} END {printf "%03d", l+1}' README 2> /dev/null || echo 001)