[arch-commits] Commit in pkgstats/repos (3 files)
Pierre Schmitz
pierre at archlinux.org
Fri Nov 7 09:18:31 UTC 2008
Date: Friday, November 7, 2008 @ 04:18:31
Author: pierre
Revision: 18559
Merged revisions 18557 via svnmerge from
svn+ssh://svn.archlinux.org/home/svn-packages/pkgstats/trunk
........
r18557 | pierre | 2008-11-07 10:15:33 +0100 (Fr, 07 Nov 2008) | 2 lines
upgpkg: pkgstats 1.0-2
be more verbose
........
Modified:
pkgstats/repos/extra-i686/ (properties)
pkgstats/repos/extra-i686/PKGBUILD
pkgstats/repos/extra-i686/pkgstats.sh
-------------+
PKGBUILD | 4 ++--
pkgstats.sh | 47 +++++++++++++++++++++++++++++++++++++++++------
2 files changed, 43 insertions(+), 8 deletions(-)
Property changes on: pkgstats/repos/extra-i686
___________________________________________________________________
Name: svnmerge-integrated
- /pkgstats/trunk:1-18526
+ /pkgstats/trunk:1-18558
Modified: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2008-11-07 09:16:36 UTC (rev 18558)
+++ extra-i686/PKGBUILD 2008-11-07 09:18:31 UTC (rev 18559)
@@ -3,14 +3,14 @@
pkgname=pkgstats
pkgver=1.0
-pkgrel=1
+pkgrel=2
pkgdesc='submits a list of installed packages to the Arch Linux project'
arch=('i686' 'x86_64')
url='http://www.archlinux.de'
license=('GPL')
depends=('bash' 'curl' 'pacman')
source=('pkgstats.sh')
-md5sums=('6a0428fd3eb687aa32089a81e6316f7e')
+md5sums=('43096cb1ad7c1228510399c8d45a5780')
build() {
install -D -m755 ${srcdir}/pkgstats.sh ${pkgdir}/usr/bin/pkgstats
Modified: extra-i686/pkgstats.sh
===================================================================
--- extra-i686/pkgstats.sh 2008-11-07 09:16:36 UTC (rev 18558)
+++ extra-i686/pkgstats.sh 2008-11-07 09:18:31 UTC (rev 18559)
@@ -1,13 +1,48 @@
#!/bin/bash
+pkgstatsver=1.0
+showonly=false
+
+usage() {
+ echo "usage: ${0} [option]"
+ echo 'options:'
+ echo ' -v show the version of pkgstats'
+ echo ' -d enable debug mode'
+ echo ' -h show this help'
+ echo ' -s show what information would be sent'
+ echo ' (but do not send anything)'
+ echo ''
+ echo 'pkgstats sends a list of all installed packages and'
+ echo 'the architecture you are using to the Arch Linux project.'
+}
+
+while getopts 'vdhs' option; do
+ case $option in
+ v) echo "pkgstats, version ${pkgstatsver}"; exit 0;;
+ d) debug='-v';;
+ s) showonly=true;;
+ *) usage; exit 0;;
+ esac
+done
+
pkglist=$(mktemp --tmpdir pkglist.XXXXXX)
+echo 'Creating package list...'
pacman -Qq > ${pkglist}
-curl -f -H 'Expect: ' \
- --data-urlencode "packages@${pkglist}" \
- --data-urlencode "arch=$(uname -m)" \
- --data-urlencode "pkgstatsver=1.0" \
- 'http://www.archlinux.de/?page=PostPackageList' \
- || echo 'Sorry, package list could not be sent.'
+if $showonly; then
+ echo 'packages='
+ cat ${pkglist}
+ echo ''
+ echo "arch=$(uname -m)"
+ echo "pkgstatsver=${pkgstatsver}"
+else
+ echo 'Submitting data...'
+ curl ${debug} -f -H 'Expect: ' \
+ --data-urlencode "packages@${pkglist}" \
+ --data-urlencode "arch=$(uname -m)" \
+ --data-urlencode "pkgstatsver=${pkgstatsver}" \
+ 'http://www.archlinux.de/?page=PostPackageList' \
+ || echo 'Sorry, package list could not be sent.'
+fi
rm -f ${pkglist}
More information about the arch-commits
mailing list