commit 3fb11b3b941abcb597a62775baac15ae72bb75fe
Author: Elan Ruusamäe <[email protected]>
Date:   Thu Nov 8 08:40:47 2012 +0200

    update-geoip: allow reporting current status and not updating

 update-geoip.sh | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)
---
diff --git a/update-geoip.sh b/update-geoip.sh
index 981d6f0..c95589c 100755
--- a/update-geoip.sh
+++ b/update-geoip.sh
@@ -1,13 +1,38 @@
 #!/bin/sh
 set -x
 set -e
+
+update=false
+status=false
+while [ $# -gt 0 ]; do
+       case "$1" in
+       update|-update|--update)
+               update=true
+               shift
+               ;;
+       status|-status|--status)
+               status=true
+               shift
+               ;;
+       *)
+               break
+               ;;
+       esac
+done
+
 pkgs='GeoIP-db-City GeoIP-db-Country GeoIP-db-IPASNum xtables-geoip'
 for pkg in ${*:-$pkgs}; do
+       $status && continue
+
        ./builder -g -ns $pkg
        cd $pkg
-       rm -vf *.gz *.zip
+
+       $update && rm -vf *.gz *.zip
+
        specfile=*.spec
+
        ../md5 -p1 $specfile
+
        version=$(awk '/^Version:[      ]+/{print $NF}' $specfile)
        if [ $pkg = "xtables-geoip" ]; then
                dt4=$(TZ=GMT stat -c '%y' *.zip | awk '{print $1}' | tr -d -)
@@ -31,3 +56,9 @@ for pkg in ${*:-$pkgs}; do
        ../builder -bb *.spec
        cd ..
 done
+
+for pkg in ${*:-$pkgs}; do
+       cd $pkg
+       git status -s
+       cd ..
+done
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/rpm-build-tools.git/commitdiff/3fb11b3b941abcb597a62775baac15ae72bb75fe

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

Reply via email to