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