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

tille at users.alioth.debian.org tille at users.alioth.debian.org
Mon May 7 20:20:51 UTC 2012


Author: tille
Date: Mon May  7 20:20:50 2012
New Revision: 3317

URL: http://svn.debian.org/wsvn/blends/?sc=1&rev=3317
Log:
Try to make script to fetch machine-readable files from different Vcses able to run in cron job by redirecting output to logfile

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=3317&op=diff
==============================================================================
--- blends/trunk/machine_readable/fetch-machine-readable (original)
+++ blends/trunk/machine_readable/fetch-machine-readable Mon May  7 20:20:50 2012
@@ -4,10 +4,13 @@
 #
 # TODO: store file <pkg>.vcs with the Vcs URL where the files were found
 
-MACHINEREADABLEARCHIVE=/srv/home/groups/blends/htdocs/upstream/machine-readable_no-clone.tar.bz2
-TDNAME=machine-readable-files
+TDNAME=machine-readable
+MACHINEREADABLEARCHIVE=/srv/home/groups/blends/htdocs/${TDNAME}/${TDNAME}.tar.bz2
 TARGETDIR=${HOME}/$TDNAME
 mkdir -p $TARGETDIR
+
+ERRLOG=${HOME}/${TDNAME}.log
+rm -f $ERRLOG
 
 SVNDIRS="debian-med/trunk/packages
          debian-science/packages
@@ -69,11 +72,11 @@
           fi
         done
       else
-        echo "Can not parse changelog for source name of $pkg"
+        echo "Can not parse changelog for source name of $pkg" >> $ERRLOG
         mv changelog ${pkg}.broken.changelog
       fi
     else
-      echo "No changelog found for $pkg"
+      echo "No changelog found for $pkg" >> $ERRLOG
       cp -a $TMPLIST ~/_changelog_for_${pkg}_missing
       cp -a $PKGLIST ~/_pkglist_for_${pkg}_missing
     fi
@@ -98,7 +101,7 @@
       git show HEAD:$file > $target
     done
   else
-    echo "Can not find debian/changelog in $1"
+    echo "Can not find debian/changelog in $1" >> $ERRLOG
   fi
   cd $curdir
 }
@@ -107,12 +110,12 @@
 rm -rf $TARGETDIR/*
 
 for svndir in $SVNDIRS ; do
-  echo $svndir
+  echo $svndir >> $ERRLOG
   svn_checkout_machine_readable $svndir
 done
 
 for gitdir in $GITDIRS ; do
-  echo $gitdir
+  echo $gitdir >> $ERRLOG
   for gitrepo in `find /git/$gitdir -mindepth 1 -maxdepth 1 -type d -name "*.git"` ; do
     # echo $gitrepo
     if [ "$gitrepo" != ".git" ] ; then




More information about the Blends-commit mailing list