Skip to content

Instantly share code, notes, and snippets.

@heftig
Created May 16, 2010 17:19
Show Gist options
  • Save heftig/403019 to your computer and use it in GitHub Desktop.
Save heftig/403019 to your computer and use it in GitHub Desktop.
--- /var/abs/extra/vim/PKGBUILD 2010-05-16 06:07:08.000000000 +0200
+++ PKGBUILD 2010-05-16 19:15:17.968270553 +0200
@@ -20,6 +20,7 @@
__hgroot='http://vim.googlecode.com/hg/'
__hgrepo='vim'
+__hgbranch='default'
_versiondir="vim${_srcver//./}"
@@ -31,11 +32,22 @@
msg2 'Checking out source from Mercurial...'
if [[ -d ${__hgrepo} ]]; then
- ( cd ${__hgrepo}; hg pull; hg update -r ${__hgrev}) || return 1
+ cd ${__hgrepo}
+ hg pull || warning "hg pull failed!"
+ hg update -r ${__hgrev} || return 1
else
hg clone -u ${__hgrev} "${__hgroot}${__hgrepo}" ${__hgrepo} || return 1
+ cd ${__hgrepo}
fi
+ __hgrev_new=$(hg id -nr ${__hgbranch})
+ if (( __hgrev < __hgrev_new )); then
+ warning "You are not building the latest revision!"
+ warning "Consider updating __hgrev to ${__hgrev_new}"
+ sleep 10
+ fi
+
+ cd ..
rm -rf vim-build gvim-build
rsync -a --exclude='.hg/' ${__hgrepo}/ vim-build || return 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment