# apply all of the available patches on the site _md5sums="${_source1}/patches/${_version}/MD5SUMS" curl ${_md5sums} | sed -e '/.gz$/d' > MD5SUMS _srcurl="${_source1}/patches/${_version}/" # download the patches in parallel cat MD5SUMS | awk '{ print $2 }' | sed -e \ "s|^|${_srcurl}|" | xargs -P 0 -r -n 1 wget -nv md5sum -c MD5SUMS > /dev/null || return 1 for file in $(cat MD5SUMS | awk '{ print $2 }') do patch -p0 < $file > vim.full.patch.log; done