# HG changeset patch # User Jeff Hammel # Date 1294690677 28800 # Node ID 5e14fe86bc52c731ace47b698099788767bc4b72 # Parent 0e014622ac1e6b3526d2c98eee4d7ff9a0806733 fix some things diff -r 0e014622ac1e -r 5e14fe86bc52 autobot/process/factory.py --- a/autobot/process/factory.py Mon Jan 10 11:53:09 2011 -0800 +++ b/autobot/process/factory.py Mon Jan 10 12:17:57 2011 -0800 @@ -12,7 +12,9 @@ """ returns a command to echo the found file """ - return ' || '.join(['ls -d %s 2> /dev/null' % arg for arg in args]) + args = ['[ -e "%s" ]; then echo "%s"' % (arg, arg) for arg in args] + command = 'if %s; else false; fi' % '; elif '.join(args) + return ['bash', '-c', command] class VirtualenvFactory(BuildFactory): """ @@ -27,7 +29,7 @@ BuildFactory.__init__(self) self.addStep(CreateVirtualenv(name)) - self.addStep(ShellCommand(command=['mkdir', 'src'], + self.addStep(ShellCommand(command=['mkdir', '-p', 'src'], workdir=name)) # TODO: set properities: # - virtualenv location