summaryrefslogtreecommitdiffstats
path: root/urpmf
blob: 12fa9f89ea35ea711aa590b9cbe9790ede76a65a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh

# NOTE TO MANTAINERS: when you add a string that is displayed to
# the user use $ECHO not echo (that will use gettext if available)

# i18n support
ECHO=`which gettext 2> /dev/null`
[ -z "$ECHO" ] && ECHO="echo" || ECHO="$ECHO -s"
TEXTDOMAIN="urpmi"

if [ "$#" -gt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
    $ECHO "usage: rpmf [<file>]"
    exit 1
fi

dir="/var/lib/urpmi"


if /bin/ls $dir/hdlist.* >/dev/null 2>/dev/null; then
    packdrake -c $dir/hdlist.* | parsehdlist --files --quiet - | grep -E "$1"
else
    $ECHO "urpmi is not installed"
    exit 1
fi