[med-svn] r1436 - trunk/community/infrastructure/scripts
tille at alioth.debian.org
tille at alioth.debian.org
Mon Feb 18 16:08:12 UTC 2008
Author: tille
Date: 2008-02-18 16:08:11 +0000 (Mon, 18 Feb 2008)
New Revision: 1436
Modified:
trunk/community/infrastructure/scripts/update-tasks
trunk/community/infrastructure/scripts/update-tasks-wrapper
Log:
Regard CDD as command line argument
Modified: trunk/community/infrastructure/scripts/update-tasks
===================================================================
--- trunk/community/infrastructure/scripts/update-tasks 2008-02-18 16:03:20 UTC (rev 1435)
+++ trunk/community/infrastructure/scripts/update-tasks 2008-02-18 16:08:11 UTC (rev 1436)
@@ -13,12 +13,12 @@
import apt_inst
import HTMLTemplate
import re
-import sys
+from sys import argv, exit, stderr
import time
from datetime import datetime
from email.Utils import formatdate
-from cddtasktools import CddDependencies, HTMLBASE
+from cddtasktools import CddDependencies, HTMLBASE, REPOS
CDD='debian-med'
@@ -175,7 +175,15 @@
else:
node.license.raw = "<?=_('License')?>: N/A"
-cdeps=CddDependencies('debian-med')
+if len(argv) <= 1 :
+ print >>stderr, "Warning: No CDD name given as command line argument. Using %s." % CDD
+else:
+ if argv[1] not in REPOS.keys():
+ print >>stderr, "Unknown CDD name: %s. Don't know what to do." % CDD
+ exit(-1)
+ CDD = argv[1]
+
+cdeps=CddDependencies(CDD)
cdeps.GetAllDependencies()
base=HTMLBASE + '/' + CDD
Modified: trunk/community/infrastructure/scripts/update-tasks-wrapper
===================================================================
--- trunk/community/infrastructure/scripts/update-tasks-wrapper 2008-02-18 16:03:20 UTC (rev 1435)
+++ trunk/community/infrastructure/scripts/update-tasks-wrapper 2008-02-18 16:08:11 UTC (rev 1436)
@@ -1,4 +1,4 @@
#!/bin/bash
SCRIPT=/home/groups/debian-med/scripts/update-tasks
-python $SCRIPT 1>/dev/null 2>&1
+python $SCRIPT debian-med 1>/dev/null 2>&1
More information about the debian-med-commit
mailing list