jannet: Add -v option to info command

This commit is contained in:
Jan Lindemann 2007-09-19 09:34:30 +00:00 committed by Jan Lindemann
commit 6729423c67

View file

@ -1,6 +1,7 @@
#!/bin/sh
myname=`basename $0`
opts="v"
channel_present()
{
@ -31,8 +32,26 @@ EOT
fi
}
get_opts()
{
set -- `getopt $opts $*`
while [ "$1" != -- ] ; do
case "$1" in
-v)
opt_verbose=true
;;
*)
eusage
;;
esac
shift
done
shift
}
cmd="$1"
shift
get_opts $*
case $cmd in
@ -65,7 +84,15 @@ install)
sudo smart install -y $*
;;
info)
rpm -qai | grep -iB 7 "jannet.de\|c-mexx.com"
if [ "$opt_verbose" = true ]; then
rpm -qai | grep -iB 7 "jannet.de\|c-mexx.com"
else
rpm -qai | \
grep -iB 7 "jannet.de\|c-mexx.com" | \
sed '/Name/ !d; s/Name *: //; s/ *.*//' | \
xargs rpm -q | \
sort -u
fi
;;
help)
usage 0