Author: jhammel
Date: 2007-07-31 17:05:04 -0400 (Tue, 31 Jul 2007)
New Revision: 7908
Added:
build/build-environment/bin/build-openplans.py
build/build-environment/bin/mkbuildenv.sh
Log:
* moving build-openplans.py to the appropriate location
* making a script to make a build environment
Copied: build/build-environment/bin/build-openplans.py (from rev 7907,
build/build-environment/build-openplans.py)
===================================================================
--- build/build-environment/bin/build-openplans.py
(rev 0)
+++ build/build-environment/bin/build-openplans.py 2007-07-31 21:05:04 UTC
(rev 7908)
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+
+import sys, os
+import subprocess
+from optparse import OptionParser
+
+apps = [ 'tasktracker',
+ 'deliverance',
+ 'opencore' ]
+
+# maybe this is too clever ;)
+options = dict([(i,[]) for i in apps])
+
+def error(msg, type='Error'):
+ print '%s: %s' % (type, msg)
+ sys.exit(1)
+
+def usage(msg=None):
+ prog = sys.argv[0]
+ usage_string = "Usage: %s <conf.ini> [options]" % prog
+ if msg:
+ error('\n\n'.join((msg, usage_string)))
+ else:
+ error(usage_string, type='Usage')
+
+def parse_options(options=None):
+
+ conffile = None
+ if options is None:
+ options = sys.argv[1:]
+
+ ctr = 0
+ while ctr < len(options):
+ for app in apps:
+ opt = '--%s-' % app
+ if options[ctr].startswith(opt):
+ # this only handles switches with arguments
+ globals()['options'][app].extend(['--%s' %
+ options[ctr].split(opt)[-1],
+ options[ctr+1]])
+ ctr += 2
+ break
+ else:
+ if conffile is None:
+ conffile = options[ctr]
+ else:
+ usage('Configuration file "%s" already specified' % conffile)
+ ctr += 1
+
+ if not conffile:
+ usage()
+
+ return conffile
+
+def main():
+ conffile = parse_options()
+ if not os.path.exists(conffile):
+ error('File "%s" not found' % conffile)
+
+ for app in apps:
+ args = ['build-%s' % app, '--conf', conffile]
+ args.extend(options[app])
+ print '>>> %s' % ' '.join(args)
+ subprocess.check_call(arg
+
+if __name__ == '__main__':
+ main()
Added: build/build-environment/bin/mkbuildenv.sh
===================================================================
--- build/build-environment/bin/mkbuildenv.sh (rev 0)
+++ build/build-environment/bin/mkbuildenv.sh 2007-07-31 21:05:04 UTC (rev
7908)
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+usage() {
+ prog=$(basename $0)
+ echo "Usage: ${prog} <conf.ini>"
+ exit 1
+}
+
+# insist on one --conf override file
+if (( $# != 1 ))
+then
+ usage
+fi
+
+if [[ "$1" == "--help" || "$1" == "-h" ]]
+then
+ usage
+fi
+
+wget http://svn.colorstudy.com/home/ianb/workingenv/workingenv.py
+chmod u+x workingenv.py
+./workingenv.py $1
+svn co https://svn.openplans.org/svn/build/build-environment $1
+cd $1
+source bin/activate
+for i in opencore tasktracker deliverance
+do
+ easy_install https://svn.openplans.org/svn/build/topp.build.${i}/trunk/
+done
+
+rm workingenv.py # assumes this didn't previously exist
Property changes on: build/build-environment/bin/mkbuildenv.sh
___________________________________________________________________
Name: svn:executable
+ *
--
Archive:
http://www.openplans.org/projects/opencore/lists/openplans-svn/archive/2007/07/1185915904919
To unsubscribe send an email with subject unsubscribe to [EMAIL PROTECTED]
Please contact [EMAIL PROTECTED] for questions.