#!/bin/bash # a quick hack to put the contents of a directory in to a html file output_file=index.html if [ -d "$1" ]; then directory="$1" else directory=/mnt/cdrom/RedHat/RPMS # or wherever the RPMs are fi FORMAT='

%{NAME}

General Info

Dependencies

Description

Version/Release: %{VERSION}-%{RELEASE}
Group: %{GROUP}
Packager: %{PACKAGER}
URL: %{URL}
Summary: %{SUMMARY} %{DESCRIPTION} \n\n ' echo ' RPMs on the CD ' > ${output_file} for X in $directory do rpm -qp --queryformat "$format" $X >> ${output_file} done echo '
' > ${output_file} # end of script