[pacman-dev] [PATCH] Integrate versionpkg into makepkg

Miklos Vajna vmiklos at frugalware.org
Sat Oct 27 07:24:15 EDT 2007


On Fri, Oct 26, 2007 at 01:12:47PM -0600, Scott Horowitz <stonecrest at gmail.com> wrote:
> +       if [ ! -z ${_darcstrunk} ] && [ ! -z ${_darcsmod} ] ; then
> +               msg "determining latest darcs revision... \c"
> +               newpkgver=$(date +%Y%m%d)
> +               echo $newpkgver
> +       elif [ ! -z ${_cvsroot} ] && [ ! -z ${_cvsmod} ] ; then
> +               msg "determining latest cvs revision... \c"
> +               newpkgver=$(date +%Y%m%d)
> +               echo $newpkgver
> +       elif [ ! -z ${_gitroot} ] && [ ! -z ${_gitname} ] ; then
> +               msg "determining latest git revision... \c"
> +               newpkgver=$(date +%Y%m%d)
> +               echo $newpkgver

for darcs and git, you could use curl to determine the last update of
the repo. they will be still ugly (not as nice as git-describe is), but
at least it will show when the master branch is updated

like:

date +%Y%m%d%H%M%S --date '`curl -I $url/HEAD 2>&1|sed -n '/^Last-Modified/s/^[^:]*: //p'`'

and

lynx -source -dump $url/_darcs/inventory|grep ']'|sed -n 's/.*\*\(.*\)\]./\1/;$ p'

more examples here:

http://git.frugalware.org/gitweb/gitweb.cgi?p=frugalware-current.git;a=blob;f=source/include/scm.sh

- VMiklos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071027/30c27662/attachment.pgp>


More information about the pacman-dev mailing list