#! /bin/sh
#
# RPM information extraction plugin for the KDiskCat project
#
# (C) 1999 Balazs Terenyi <terenyi@freemail.c3.hu>
#

if test ${!#} = "--help"; then 
    echo "kaderpm 0.1 (C) 1999 Balazs Terenyi <terenyi@freemail.c3.hu>"
    echo
    echo "RPM information extraction plugin for the KDiskCat project"
    exit 0
fi

if test ${!#} = "--default"; then
    echo -n "*.rpm,*.RPM|"
    exit 0
fi

while read input; do
    rpm -q -p "$input" --queryformat %{DESCRIPTION}"\nv"%{VERSION}"-"%{RELEASE}
    echo "|END|"
done