[Blends-commit] r3323 - /blends/trunk/machine_readable/fetch-machine-readable

tille at users.alioth.debian.org tille at users.alioth.debian.org
Sat May 12 16:21:38 UTC 2012


Author: tille
Date: Sat May 12 16:21:36 2012
New Revision: 3323

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3323
Log:
Cope with packages in SVN subdirectories

Modified:
    blends/trunk/machine_readable/fetch-machine-readable

Modified: blends/trunk/machine_readable/fetch-machine-readable
URL: http://svn.debian.org/wsvn/blends/blends/trunk/machine_readable/fetch-machine-readable?rev=3323&op=diff
==============================================================================
--- blends/trunk/machine_readable/fetch-machine-readable (original)
+++ blends/trunk/machine_readable/fetch-machine-readable Sat May 12 16:21:36 2012
@@ -45,7 +45,8 @@
   # Regard different directory layout options
   if grep -q "/trunk/debian/" $TMPLIST ; then
     # for Debian Med and Debian Science layout
-    sed 's?/trunk/debian/.*??' $TMPLIST | sed 's?^.*/\([^/]\+\)?\1?' | sort | uniq > $PKGLIST
+    svndir=`echo $1 | sed 's?^[^/]*/??'`
+    sed -e 's?debian/.*??' -e 's?trunk/.*??' $TMPLIST | sed -e "s?^$svndir/??" -e 's+/$++' | sort | uniq > $PKGLIST
     trunklayout="/trunk"
   else
     # for DebiChemn layout
@@ -53,18 +54,21 @@
     trunklayout=""
   fi
 #  set -x
-  for pkg in `cat $PKGLIST` ; do
+  for pkgdir in `cat $PKGLIST` ; do
+    pkg=`echo $pkgdir | sed -e 's?^.*/\([^/]\+\)?\1?'`
     chlog=`grep -e "/$pkg/trunk/debian/changelog$" -e "^$pkg/trunk/debian/changelog$" -e "^$pkg/debian/changelog$" $TMPLIST 2>/dev/null`
+    ## DEBUG
+    # echo "$pkgdir -> $pkg ($chlog)"
     if [ "" != "$chlog" ] ; then
       svn export svn://localhost/$1/$chlog >/dev/null
       srcname=`dpkg-parsechangelog -lchangelog 2>/dev/null | sed -n 's/^Source: //p'`
       if [ "" != "$srcname" ] ; then
-        trunk="/trunk" # at least for Debian Med and Debian Science
+        trunk="trunk" # at least for Debian Med and Debian Science
         firstletter=`echo $srcname | sed "s/^\(.\).*/\1/"`
         mkdir -p $TARGETDIR/$firstletter
         mv changelog $TARGETDIR/$firstletter/${srcname}.changelog
-        echo "Vcs-Svn: svn://svn.debian.org/$1/$pkg$trunk/" > $TARGETDIR/$firstletter/${srcname}.vcs
-        echo "Vcs-Browser: http://svn.debian.org/wsvn/$1/$pkg$trunk/" >> $TARGETDIR/$firstletter/${srcname}.vcs
+        echo "Vcs-Svn: svn://svn.debian.org/$1/$pkgdir/$trunk/" > $TARGETDIR/$firstletter/${srcname}.vcs
+        echo "Vcs-Browser: http://svn.debian.org/wsvn/$1/$pkgdir/$trunk/" >> $TARGETDIR/$firstletter/${srcname}.vcs
         echo "Blend: `echo $1 | sed 's?/.*??'`" >> $TARGETDIR/$firstletter/${srcname}.vcs
         for file in control copyright upstream ; do
           getfile=`grep -e "/$pkg/trunk/debian/$file$" -e "^$pkg/trunk/debian/$file$" -e "^$pkg/debian/$file$" $TMPLIST 2>/dev/null`




More information about the Blends-commit mailing list