I use perl GCI for this kind of stuff all the time. Basically make your
html file (lets call it file.html) and put a marker in there, like
%%MD5SUM%% or something. Then your CGI does this:
#!/usr/bin/perl
$|=1;
$file="file.html";
chomp($md5=`md5sum direct.tar.bz2`);
open(F, $file);
while(<F>) {
s/%%MD5SUM%%/$md5/ if (/%%MD5SUM%%/);
print;
}
close (F);
exit(0);
That's extremely simplified with no full paths or strict mode or error
checking, but you get the idea.
On Sat, 14 Jul 2012, Brian Wood wrote:
> I'm wondering how to automate something further. Currently I
> use the following commands (in a script) when I publish a
> new version of the software.
>
> md5sum direct.tar.bz2 | tee md5checksum
> cat md5checksum | xclip -sel clip
>
> After that I edit an html file by hand and paste the new
> checksum into the file. Once in a while I forget to do that
> step. So I'd like to figure out how to improve the process.
> What do you suggest? Thanks in advance.
>
>
> Shalom,
> Brian Wood
> Ebenezer Enterprises
> http://webEbenezer.net
>
>
>
>
>
>
>
-Yaron
--