Support doxygen builds and report invalid commands.
authorCarl Hetherington <cth@carlh.net>
Wed, 24 Apr 2013 15:08:37 +0000 (16:08 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 24 Apr 2013 15:08:37 +0000 (16:08 +0100)
cdist

diff --git a/cdist b/cdist
index 545cae1f8f08766e18e49671251578624a34217e..55e1c34efb793279d676e965f958a88a368a6dce 100755 (executable)
--- a/cdist
+++ b/cdist
@@ -518,6 +518,19 @@ elif args.command == 'manual':
 
     env.cleanup()
 
+elif args.command == 'doxygen':
+    env = HostEnvironment()
+    env.checkout(project)
+
+    dirs = project.cscript['make_doxygen'](env)
+    if hasattr(dirs, 'strip') or (not hasattr(dirs, '__getitem__') and not hasattr(dirs, '__iter__')):
+        dirs = [dirs]
+
+    for d in dirs:
+        copytree(d, '%s/%s' % (args.output, 'doc'))
+
+    env.cleanup()
+
 elif args.command == 'latest':
     env = HostEnvironment()
     env.checkout(project)
@@ -534,3 +547,6 @@ elif args.command == 'latest':
 
     print latest
     env.cleanup()
+
+else:
+    error('invalid command %s' % args.command)