summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-08 19:35:26 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-02-08 19:35:26 +0000
commitbb262854bc53882a4d0c2e81e3e21a2ed1025986 (patch)
tree23dab6fcbd23aab200fb0aa7274e9e430296a910 /morph
parentc163d09ab436b6c219dc17f371f29c35d0c1d0da (diff)
downloadmorph-bb262854bc53882a4d0c2e81e3e21a2ed1025986.tar.gz
Extract chunk submodule repos into the build directory directly.
This change requires the latest version of cliapp to be installed. Rather than creating an archive from the cached git repositories, moving this tarball archive into the cache and then extracting it from there into the build directory, we now directly extract the sources into the build directory. We also recursively extract all submodules into the corresponding paths inside the build directory. (Recursing has not been tested yet, however.)
Diffstat (limited to 'morph')
-rwxr-xr-xmorph21
1 files changed, 21 insertions, 0 deletions
diff --git a/morph b/morph
index 229d96b3..38e13ff2 100755
--- a/morph
+++ b/morph
@@ -380,6 +380,27 @@ class Morph(cliapp.Application):
self.output.write('%s\n' % msg)
self.output.flush()
+ def runcmd(self, argv, *args, **kwargs):
+ # check which msg function to use
+ msg = self.msg
+ if 'msg' in kwargs:
+ msg = kwargs['msg']
+ del kwargs['msg']
+
+ # convert the command line arguments into a string
+ commands = [argv] + list(args)
+ for command in commands:
+ if isinstance(command, list):
+ for i in xrange(0, len(command)):
+ command[i] = str(command[i])
+ commands = [' '.join(command) for command in commands]
+
+ # print the command line
+ msg('# %s' % ' | '.join(commands))
+
+ # run the command line
+ cliapp.Application.runcmd(self, argv, *args, **kwargs)
+
if __name__ == '__main__':
Morph().run()