summaryrefslogtreecommitdiffstats
path: root/rpmf
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2000-03-07 23:25:41 +0000
committerPascal Rigaux <pixel@mandriva.com>2000-03-07 23:25:41 +0000
commit7ae5fce08dd4a02652e48d689d19b91a6fa6954a (patch)
treeb33f97f0eb4536cfc61a96ac0e34bbaa6d2758d9 /rpmf
parent0da8267df66103f9b1ac183e016998f58594fbe3 (diff)
downloadurpmi-7ae5fce08dd4a02652e48d689d19b91a6fa6954a.tar
urpmi-7ae5fce08dd4a02652e48d689d19b91a6fa6954a.tar.gz
urpmi-7ae5fce08dd4a02652e48d689d19b91a6fa6954a.tar.bz2
urpmi-7ae5fce08dd4a02652e48d689d19b91a6fa6954a.tar.xz
urpmi-7ae5fce08dd4a02652e48d689d19b91a6fa6954a.zip
no_comment
Diffstat (limited to 'rpmf')
-rwxr-xr-xrpmf18
1 files changed, 11 insertions, 7 deletions
diff --git a/rpmf b/rpmf
index d42f07bb..235c4903 100755
--- a/rpmf
+++ b/rpmf
@@ -5,15 +5,19 @@ if [ "$#" -gt 1 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
exit 1
fi
-hdlist="/var/lib/urpmi/hdlist.*.gz"
+dir="/var/lib/urpmi"
-if ! ls $hdlist >/dev/null 2>/dev/null; then
+
+if ls $dir/hdlist.*.gz >/dev/null 2>/dev/null; then
+ found=1
+ gzip -dc $dir/hdlist.*.gz | hdlist2files - | grep -E "$1"
+fi
+if ls $dir/hdlist.*.cz2 >/dev/null 2>/dev/null; then
+ found=1
+ bzip2 -dc $dir/hdlist.*.cz2 2>/dev/null | hdlist2files - | grep -E "$1"
+fi
+if [ "$found" != "1" ]; then
echo "urpmi is not installed"
exit 1
fi
-if [ -z "$1" ]; then
- gzip -dc $hdlist | hdlist2files -
-else
- gzip -dc $hdlist | hdlist2files - | grep -E $1
-fi