diff -Nur -x '*.orig' -x '*.rej' e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand --- e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2007-03-26 17:44:05.000000000 -0400 +++ mezzanine_patched_e-smith-lib-1.18.0/root/etc/e-smith/events/actions/generic_template_expand 2007-03-26 17:29:02.000000000 -0400 @@ -27,9 +27,6 @@ my $event = shift or die "Event name is required\n"; -my $filename; -my %args; -my ($param, $value); my $templates_dir = "/etc/e-smith/events/$event/templates2expand"; exit 0 unless -d $templates_dir; @@ -48,22 +45,11 @@ sub expand { return unless -f $_; - # For each file found, read the file to find - # processTemplate args, then expand the template + # For each file found, expand the template s/^\.//; - $filename = $_; - %args = ( + warn "expanding $_\n"; + esmith::templates::processTemplate({ MORE_DATA => { EVENT => $event }, - TEMPLATE_PATH => $filename, - OUTPUT_FILENAME => $filename, - ); - open(FILE, "${templates_dir}${filename}"); - while () - { - ($param, $value) = split(/=/, $_, 2); - $args{$param} = eval $value; warn $@ if $@; - } - close(FILE); - warn "expanding $filename\n"; - esmith::templates::processTemplate(\%args); + TEMPLATE_PATH => $_, + }); }