diff options
author | Florian Pritz <bluewind@xssn.at> | 2010-03-01 20:37:34 +0100 |
---|---|---|
committer | Florian Pritz <bluewind@xssn.at> | 2010-03-01 20:39:39 +0100 |
commit | 351991ce3e10dfae9cf57e7cf79fcca9b01c585b (patch) | |
tree | b04cbcb9316474b71c8ba8570661cacee07dcb2d /gvim/fetch_patches.sh | |
parent | fb7ca9fcebda89c0f78dbc8200e35c4dd5d7c71d (diff) | |
download | aur-packages-351991ce3e10dfae9cf57e7cf79fcca9b01c585b.tar.gz aur-packages-351991ce3e10dfae9cf57e7cf79fcca9b01c585b.tar.xz |
update
Signed-off-by: Florian Pritz <bluewind@xssn.at>
Diffstat (limited to 'gvim/fetch_patches.sh')
-rw-r--r-- | gvim/fetch_patches.sh | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/gvim/fetch_patches.sh b/gvim/fetch_patches.sh index 41b8564..56ba47b 100644 --- a/gvim/fetch_patches.sh +++ b/gvim/fetch_patches.sh @@ -1,8 +1,8 @@ # the external logic for pulling in patches get_patches() { - _patchdir=${startdir}/src/patches - cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") + _patchdir=${srcdir}/patches + cd ${srcdir}/vim$(echo ${_srcver} | sed "s/\.//") if [ -d ${_patchdir} ]; then rm -rf ${_patchdir} echo -e "\tremove patches from old build" @@ -19,9 +19,10 @@ get_patches() { downloads=0 for _line in $(/bin/cat MD5SUMS); do + _file=$(echo $_line | cut -d ' ' -f3) + [ ${_file##*.} == "gz" ] && continue downloads=$((${downloads} + 1)) _md5=$(echo $_line | cut -d ' ' -f1) - _file=$(echo $_line | cut -d ' ' -f3) if [ -f ${SRCDEST}/vim-${_srcver}/${_file} ]; then echo -e "\thaving patch file:${_file}" cp ${SRCDEST}/vim-${_srcver}/${_file} ./ @@ -44,17 +45,21 @@ get_patches() { done ######## - - rm *.gz - + if [ ${downloads} != ${_patchlevel} ]; then - echo -e "Number of patches does not match the patchlevel!\nEdit the PKGBUILD accordingly!" - # return 1 + echo "" + echo -e "\t\tWARNING!" + echo "You are not building the latest available version! A newer patchlevel" + echo "seems to be available. Please edit the PKGBUILD and add the latest" + echo "${downloads} as pkgrel number!" + echo "" + sleep 10 fi IFS=$_OLDIFS rm MD5SUMS cd ${startdir}/src/vim$(echo ${_srcver} | sed "s/\.//") - for _patch in $(/bin/ls ${_patchdir}); do + for _patchnum in $(/usr/bin/seq 1 ${_patchlevel}); do + _patch=${_srcver}.$(printf "%03d" ${_patchnum}) patch -Np0 -i ${_patchdir}/${_patch} || return 1 done rm -rf ${_patchdir} |