You are not logged in.
i made a cvs pkgbuild, which recivies today's date as the version, but the daily tar.gz is a day before.
so if today is the 28/8/2008 the version will be 20080828 but the avalible src file will be pkg-20080827.tar.gz.
is there a way to make a variable like this?:
pkgver=20080828
_truepkgver=$pkgver - 1
thanks
CPU: MacBook Pro 5,5
TB: OSX 10.6 / Windows 7 / Ubuntu 9.10
Offline
Why don't you make the pkgver=20080827? Also, cvs package but using a tarball... huh?
Offline
Since pkgver is actually just an integer, you could do:
_truepkgver=$((pkgver-1))
flack 2.0.6: menu-driven BASH script to easily tag FLAC files (AUR)
knock-once 1.2: BASH script to easily create/send one-time sequences for knockd (forum/AUR)
Offline
To expand on Allan's "huh?"... ![]()
A CVS PKGBUILD checks out the latest source from the project's CVS repo and builds from that - no tarball supplied or required. If the project provides daily tarballs, that means that they are doing the checkout themselves and tarring it up. In that case, you do not need to create a CVS PKGBUILD - you can create a typical tarball-based PKGBUILD, and put whatever date you want in as $pkgver.
Offline
pkgver=$(($(date +%Y%m%d)-1))
Edit: eh, wut?! When I was reading up on the bash and date manpages there had been no answers, and now this. Maniacs! ![]()
Last edited by byte (2008-08-28 08:44:31)
I hate sigs. This one only exists to remind myself to get an avatar.
Offline
i know i can make a regular pkgbuild. but then every update i will have to manually change the pkgver - not cool ![]()
the whole point of the cvs pkg is to type "makepkg" and have the latest src.
and yes - it's a cvs with daily tar.gz builds.
pkgver=$(($(date +%Y%m%d)-1))
this is great, will this work on the 1st of the month as well? or should i add an "if it's the first - return 1"
thanks for the replies.
Last edited by adamruss (2008-08-28 08:53:46)
CPU: MacBook Pro 5,5
TB: OSX 10.6 / Windows 7 / Ubuntu 9.10
Offline
No, it won't, forget about that.
Use a proper CVS PKGBUILD instead. There's no need to edit anything afterwards, as long as you follow /usr/share/pacman/PKGBUILD-cvs.proto.
I hate sigs. This one only exists to remind myself to get an avatar.
Offline
I think this is still the rule of thumb, these + versionpkg:
http://wiki.archlinux.org/index.php/Arc … S_PKGBUILD
Offline
Erm, versionpkg is deprecated for quite a while. Normal makepkg should have incorporated all of it.
I hate sigs. This one only exists to remind myself to get an avatar.
Offline
i understand why you all say to use a proper cvs pkgbuild - but there is no cvs repository, only daily builds, and i would like the pkgbuild to update the pkgver it self.
this is a pkgbuild for my own use (not posting on AUR) so i can do what ever right? ![]()
thanks for all the reply's
CPU: MacBook Pro 5,5
TB: OSX 10.6 / Windows 7 / Ubuntu 9.10
Offline
For the date arithmetic, use:
date --date=yesterday +FORMAT
I've never seen it documented that the --date parameter takes today,yesterday,.. but it does. Found it by trial & error.
Offline
Documented in a general non-specific way in the man page, and in an exhaustive, nitty-gritty way in the info page.
Offline
tomk, thanks for that site
Offline