FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 12-03-2011, 03:36 PM
John Sumsion
 
Default makepkg: Making git support do auto-clone/fetch.

Patterned after the hg logic.

Signed-off-by: John Sumsion <john@sumsion.org>
---
scripts/makepkg.sh.in | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 8a5eca0..83337fe 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1701,8 +1701,18 @@ devel_check() {
return 0
fi
msg "$(gettext "Determining latest %s revision...")" 'git'
+ if [[ -d ./src/$_gitname ]] ; then
+ cd ./src/$_gitname
+ git remote update
+ else
+ [[ ! -d ./src/ ]] && mkdir ./src/
+ git clone $_gitroot/$_gitname ./src/$_gitname
+ cd ./src/$_gitname
+ fi
newpkgver=${_gitref:-origin/master}
+ git reset --hard ${newpkgver}
newpkgver=$(git describe --always ${newpkgver} | sed -e 's/-/_/g')
+ cd ../../
elif [[ -n ${_svntrunk} && -n ${_svnmod} ]] ; then
if ! type -p svn >/dev/null; then
warning "$(gettext "Cannot find the %s binary required to
determine latest %s revision.")" "svn" "svn"
--
1.7.8
 

Thread Tools




All times are GMT. The time now is 08:57 PM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org