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