portupgrade: Insert date into log filename?
Tom McLaughlin
tmclaugh at sdf.lonestar.org
Tue Dec 28 22:03:24 PST 2004
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
More information about the freebsd-ports
mailing list