commit e3b9e8302f0ab0a1b38124892d1885957f6d2134
parent 60584c39411a944a4265b4b5a01bb412147dd081
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Sun, 15 Mar 2015 17:21:06 -0600
gen_index: forgot as part of last commit
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gen_index b/gen_index
@@ -19,8 +19,9 @@ my $cfg = get_config();
my $dbh = get_dbh($cfg->{"general"});
my $http_cfg = $cfg->{"http"};
-my $include = $http_cfg->{"chroot"} . $http_cfg->{"templates"};
my $output = $http_cfg->{"chroot"} . $http_cfg->{"htdocs"};
+my $include = $output;
+# my $include = "/home/kyle/src/pricechart/html";
print "info: including from: $include\n" if ($args{v});
print "info: outputting to: $output\n" if ($args{v});
@@ -58,8 +59,7 @@ my $vars = {
new_products => $new_products
};
-$template->process("index.html", $vars, "index.html") || die $template->error() . "\n";
-copy("$include/pricechart.css", "$output/pricechart.css");
-print "info: $include/pricechart.css -> $output/\n" if ($args{v});
+$template->process("index.tt2", $vars, "index.html")
+ || die "template: " . $template->error() . "\n";
$dbh->disconnect();