Author: glen                         Date: Wed Feb 20 16:48:06 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- move to function as i plan to inline this script to %post

---- Files affected:
SOURCES:
   rpm-hrmib-cache (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SOURCES/rpm-hrmib-cache
diff -u SOURCES/rpm-hrmib-cache:1.4 SOURCES/rpm-hrmib-cache:1.5
--- SOURCES/rpm-hrmib-cache:1.4 Wed Feb 20 17:47:04 2008
+++ SOURCES/rpm-hrmib-cache     Wed Feb 20 17:48:01 2008
@@ -1,24 +1,26 @@
 #!/bin/sh
-# skip if no rpm(1) or touch(1)
-[ -x /bin/rpm -a -x /bin/touch ] || exit 0
+build_hrmib_cache() {
+       # skip if no rpm(1) or touch(1)
+       [ -x /bin/rpm -a -x /bin/touch ] || return
 
-export LC_ALL=C
-umask 002
+       export LC_ALL=C
+       umask 002
 
-mydir=/var/cache/hrmib
-mkdir -p $mydir || exit 0
-rm -f $mydir/*
+       mydir=/var/cache/hrmib
+       mkdir -p $mydir || return
+       rm -f $mydir/*
 
-buf=$(rpm --nodigest --nosignature  -qa --qf 
'%{name}-%{version}-%{release}.%{arch} %{installtime:date}\n')
-echo "$buf" | while read nvra idate; do
-   case $nvra in
-   gpg-pubkey-*)
-        ;;
-   *)
-        touch -d "$idate" "$mydir/$nvra"
-        ;;
-   esac
-done
-touch $mydir
+       buf=$(rpm --nodigest --nosignature  -qa --qf 
'%{name}-%{version}-%{release}.%{arch} %{installtime:date}\n')
+       echo "$buf" | while read nvra idate; do
+          case $nvra in
+          gpg-pubkey-*)
+                       ;;
+          *)
+                       touch -d "$idate" "$mydir/$nvra"
+                       ;;
+          esac
+       done
+       touch $mydir
+}
 
-exit 0
+build_hrmib_cache
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/rpm-hrmib-cache?r1=1.4&r2=1.5&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to