From: Adam Dickmeiss Date: Tue, 13 Apr 2010 13:22:21 +0000 (+0200) Subject: Only update distro if it's >1 week since last update X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=144607b70bd14d9a56af3cfb945764f882a7c873;p=git-tools-moved-to-github.git Only update distro if it's >1 week since last update --- diff --git a/id-deb-build/id-pbuild-all.sh b/id-deb-build/id-pbuild-all.sh index c88ec51..cde1dc5 100755 --- a/id-deb-build/id-pbuild-all.sh +++ b/id-deb-build/id-pbuild-all.sh @@ -15,7 +15,6 @@ Usage: id-pbuild-all.sh [OPTIONS] Options: [--debian=distros] [--ubuntu=distros] - [--update=true|false] [--upload] [--concurrency=N] EOF @@ -24,7 +23,6 @@ EOF # things that might be set by options upload=false -update=true do_help=false concurrency=4 @@ -44,9 +42,6 @@ while test $# -gt 0; do --debian=*) DEBIAN_DIST=$optarg ;; - --update=*) - update=$optarg - ;; --concurrency=*) concurrency=$optarg ;; @@ -108,9 +103,9 @@ for dist in ${DEBIAN_DIST} ${UBUNTU_DIST}; do if test ! -f /var/cache/pbuilder/${dist}-${arch}-base.tgz; then sudo DIST=$dist ARCH=$arch $PBUILDER create fi - if $update; then + for f in `find /var/cache/pbuilder/${dist}-${arch}-base.tgz -ctime +7`; do sudo DIST=$dist ARCH=$arch $PBUILDER update --override-config - fi + done sudo DIST=$dist ARCH=$arch $PBUILDER --build $PKG ) >${dist}-${arch}.log 2>&1 & i=`expr $i + 1`