[arch-commits] Commit in pkgstats/trunk (PKGBUILD pkgstats.sh)

Pierre Schmitz pierre at archlinux.org
Mon Jul 30 15:39:29 UTC 2012


    Date: Monday, July 30, 2012 @ 11:39:28
  Author: pierre
Revision: 164329

remove temp files on exit

Modified:
  pkgstats/trunk/PKGBUILD
  pkgstats/trunk/pkgstats.sh

-------------+
 PKGBUILD    |    4 ++--
 pkgstats.sh |    5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2012-07-30 14:40:47 UTC (rev 164328)
+++ PKGBUILD	2012-07-30 15:39:28 UTC (rev 164329)
@@ -3,7 +3,7 @@
 
 pkgname=pkgstats
 pkgver=2.3
-pkgrel=1
+pkgrel=2
 pkgdesc='submits a list of installed packages to the Arch Linux project'
 arch=('any')
 url='https://www.archlinux.de'
@@ -11,7 +11,7 @@
 depends=('bash' 'curl' 'pacman' 'sed' 'coreutils' 'cron' 'awk' 'grep')
 source=('pkgstats.sh' 'pkgstats.cron')
 install='pkgstats.install'
-md5sums=('f894fc13082459bf16070ab54ef2501b'
+md5sums=('2943bc8c69999d8e3c0bd9b368a3f17b'
          'e86e6b9778303367f2e31f5c311da685')
 
 package() {

Modified: pkgstats.sh
===================================================================
--- pkgstats.sh	2012-07-30 14:40:47 UTC (rev 164328)
+++ pkgstats.sh	2012-07-30 15:39:28 UTC (rev 164329)
@@ -34,8 +34,9 @@
 
 ${quiet} || echo 'Collecting data...'
 pkglist="$(mktemp --tmpdir pkglist.XXXXXX)"
+moduleslist="$(mktemp --tmpdir modules.XXXXXX)"
+trap 'rm -f "${pkglist}" "${moduleslist}"' EXIT
 pacman -Qq > "${pkglist}"
-moduleslist="$(mktemp --tmpdir modules.XXXXXX)"
 if [[ -f /proc/modules ]]; then
 	awk '{ print $1 }' /proc/modules > "${moduleslist}"
 fi
@@ -76,5 +77,3 @@
 		'https://www.archlinux.de/?page=PostPackageList' \
 	|| echo 'Sorry, data could not be sent.' >&2
 fi
-
-rm -f "${pkglist}"




More information about the arch-commits mailing list