[23104] in Source-Commits

home help back first fref pref prev next nref lref last post

/svn/athena r22767 - trunk/debathena/scripts

daemon@ATHENA.MIT.EDU (ghudson@MIT.EDU)
Fri Feb 22 18:13:17 2008

Date: Fri, 22 Feb 2008 18:12:49 -0500 (EST)
From: ghudson@MIT.EDU
Message-Id: <200802222312.SAA17200@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Author: ghudson
Date: 2008-02-22 18:12:49 -0500 (Fri, 22 Feb 2008)
New Revision: 22767

Modified:
   trunk/debathena/scripts/dasource
Log:
* debathena/scripts/dasource: Tighten up the pattern used to look for
  checkouts, since binary package names may match $pkgname-*.


Modified: trunk/debathena/scripts/dasource
===================================================================
--- trunk/debathena/scripts/dasource	2008-02-22 22:13:07 UTC (rev 22766)
+++ trunk/debathena/scripts/dasource	2008-02-22 23:12:49 UTC (rev 22767)
@@ -48,10 +48,11 @@
   fi
 
   # Check out or update the package source.
-  if [ $(echo $pkgname/$pkgname-* | wc -w) -gt 2 ]; then
+  pattern="$pkgname/$pkgname-[0-9]*[0-9]"
+  if [ $(echo $pattern | wc -w) -gt 1 ]; then
     die "More than one checkout under $pkgname!"
-  elif [ -d $pkgname/$pkgname-* ]; then
-    dir=$(echo $pkgname/$pkgname-*)
+  elif [ -d $pattern ]; then
+    dir=$(echo $pattern)
     echo "Updating and cleaning $dir"
     (cd $dir && svn update && svn revert -R . &&
      svn st | awk '/^?/ {print $2}' | xargs rm -vrf)


home help back first fref pref prev next nref lref last post