Date: Wed, 29 Dec 2004 01:03:45 -0500 From: Tom McLaughlin <tmclaugh@sdf.lonestar.org> To: Chris Pepper <pepper@reppep.com> Cc: ports@freebsd.org Subject: Re: portupgrade: Insert date into log filename? Message-ID: <1104300225.858.41.camel@compass.straycat.dhs.org> In-Reply-To: <p06200704bdf7e35c2ab6@[10.0.1.103]> References: <p06200704bdf7e35c2ab6@[10.0.1.103]>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 2004-12-29 at 00:44 -0500, Chris Pepper wrote: > I'd like to insert the date into the -l argument > automatically -- is there a token I can use which would be comparable > to `date "+%Y-%m-%d-%H-%M"` in pkgtools.conf? > > > Thanks, > > > Chris Pepper Here's what I do in pkgtools.conf since it is really useful: # -*- ruby -*- # # pkgtools.conf - the configuration file for the pkgtools suite # # $Idaemons: /home/cvs/pkgtools/etc/pkgtools.conf,v 1.32 2003/10/19 11:56:30 knu Exp $ require 'date' <snip to the end of the file> # PORTUPGRADE_ARGS: string # # This sets the default options passed to portupgrade(1). # # e.g.: PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] || \ '-v -D -l /var/tmp/portupgrade.results_' + \ DateTime.now.strftime("%Y%m%d-%H:%M:%S") + ' ' + \ '-L /var/tmp/portupgrade/%s::%s.log' # PORTUPGRADE_ARGS = ENV['PORTUPGRADE'] end Tom -- BSD# Project - Porting Mono to FreeBSD http://forge.novell.com/modules/xfmod/project/?bsd-sharp
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1104300225.858.41.camel>