]> git.pld-linux.org Git - packages/rpm.git/blob - rpm-hrmib-cache
- skip if required tools missing
[packages/rpm.git] / rpm-hrmib-cache
1 #!/bin/sh
2 # skip if no rpm(1) or touch(1)
3 [ -x /bin/rpm -a -x /bin/touch ] || exit 0
4
5 export LC_ALL=C
6 umask 002
7
8 mydir=/var/cache/hrmib
9 mkdir -p $mydir || exit 0
10 rm -f $mydir/*
11
12 buf=$(rpm --nodigest --nosignature  -qa --qf '%{name}-%{version}-%{release}.%{arch} %{installtime:date}\n')
13 echo "$buf" | while read nvra idate; do
14    case $nvra in
15    gpg-pubkey-*)
16         ;;
17    *)
18         touch -d "$idate" "$mydir/$nvra"
19         ;;
20    esac
21 done
22 touch $mydir
23
24 exit 0
This page took 0.031495 seconds and 4 git commands to generate.