From: martinahansen Date: Tue, 11 Nov 2008 06:37:05 +0000 (+0000) Subject: fix date and time in ucsc config X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=1adfc9c329465a00c0347df26c437421706f9563;p=biopieces.git fix date and time in ucsc config git-svn-id: http://biopieces.googlecode.com/svn/trunk@305 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_perl/Maasha/UCSC.pm b/code_perl/Maasha/UCSC.pm index d9a9341..adb8c93 100644 --- a/code_perl/Maasha/UCSC.pm +++ b/code_perl/Maasha/UCSC.pm @@ -923,7 +923,7 @@ sub ucsc_config_get_entry $record{ 'date' } = $1; } elsif ( $line =~ /^# time: (.+)/ ) { $record{ 'time' } = $1; - } elsif ( $line =~ /^# database: (.+)/ ) { + } elsif ( $line =~ /^# (?:database:|Database) (.+)/ ) { $record{ 'database' } = $1; } elsif ( $line =~ /^#/ ) { # skip @@ -957,6 +957,11 @@ sub ucsc_config_put_entry $fh_out ||= \*STDOUT; + ( $date, $time ) = split " ", Maasha::Common::time_stamp(); + + $record->{ "date" } ||= $date; + $record->{ "time" } ||= $time; + print $fh_out "\n# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\n"; map { print $fh_out "# $record->{ $_ }\n" if exists $record->{ $_ } } qw( date time database );