#!/usr/pkg/bin/perl # Author : Stefan Schumacher stefan[at]net-tex[dot]de PGP:0xb3fbae33 # License : BSD # /home/stefan/daten/cvs/net-tex.de/code/pkg_db.pl.txt,v 1.1 2025/06/24 15:09:06 stefan Exp # Requires : pkg_info and some basic binaries (grep, sort, hostname, date) # Purpose : creates 3 HTML files, 1 containing a list of all installed pkgs # linked to one with the detailed description of the pkg and one # with a list of installed files ### create filenames using current date my $date = `date +%y%m%d`; my $longdate = `date '+%y-%m-%d %H:%M'`; chomp $date; my $file = $date.'-pkg_db.html'; my $detailfile = $date.'-pkg_db-details.html'; my $filesfile = $date.'-pkg_db-files.html'; ### open file for details open DFILE,">>$detailfile" or die; my $detailhandle = select DFILE; ### open file for fileslist open FFILE,">>$filesfile" or die; my $filehandle = select FFILE; ### index open FILE,">>$file" or die; my $handle = select FILE; ### HTML Header $hostname=`hostname`; print("
\nList of installed packages on $hostname as of $longdate\n| $ipkg | \n$sdesc "); print FILE "$#fileslist installed Files "; print FILE "Size of this pkg in mB : $pkgsize | \n