From 9e5dca11ad16cb296cc6c43ea9fcfb4f36512fc4 Mon Sep 17 00:00:00 2001 From: hoenicke Date: Tue, 14 Aug 2001 14:35:01 +0000 Subject: [PATCH] Added new script to convert php to html. git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1350 379699f6-c40d-0410-875b-85095c16579e --- jode/scripts/php2html.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 jode/scripts/php2html.pl diff --git a/jode/scripts/php2html.pl b/jode/scripts/php2html.pl new file mode 100644 index 0000000..10a670e --- /dev/null +++ b/jode/scripts/php2html.pl @@ -0,0 +1,15 @@ +#!/usr/bin/perl -w + +my $num = 0; +for (@ARGV) { + next if $_ !~ /\.php$/; + $html = $php = $_; + $html =~ s/\.php$/.html/; + + $ENV{extension}="html"; + if (! -e "$html" || (-M "$php" <= -M "$html")) { + $num++; + system "php -f $php >$html"; + } +} +print $num . " html files updated.\n";