summaryrefslogtreecommitdiffstats
path: root/urpmf
blob: a28143114477ab600e1ad3afa5a68299971becb2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

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