From 163d51536735fb81160ce8c31cad4d5d4866bb82 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 23 Oct 2015 22:54:36 -0400 Subject: [PATCH] Modify create_man_page to run db2man in the perl-xCAT directory to generate the man pages for the database. After running pod2rst, remove the perl-xCAT/pods and perl-xCAT/share directories to keep the git repo clean --- create_man_pages.py | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/create_man_pages.py b/create_man_pages.py index 89077625c..88dab6b6d 100755 --- a/create_man_pages.py +++ b/create_man_pages.py @@ -32,8 +32,25 @@ for d in allfiles: print "Removing file %s" %(d) os.remove(d) +# The database man pages are created in the perl-xCAT subdirectory +# using the db2man script +def build_db_man_pages(): + thepwd = os.getcwd() + os.chdir("perl-xCAT") + cmd = "./db2man" + os.system(cmd) + os.chdir(thepwd) + +def cleanup_db_man_pages_dir(): + shutil.rmtree("perl-xCAT/pods") + shutil.rmtree("perl-xCAT/share") + + + +build_db_man_pages() + # List the xCAT component directory which contain pod pages -COMPONENTS = ['xCAT-SoftLayer', 'xCAT-test', 'xCAT-client', 'xCAT-vlan'] +COMPONENTS = ['xCAT-SoftLayer', 'xCAT-test', 'xCAT-client', 'xCAT-vlan', 'perl-xCAT'] for component in COMPONENTS: for root,dirs,files in os.walk("%s" %(component)): @@ -63,3 +80,6 @@ for component in COMPONENTS: cmd = "pod2rst --infile=%s --outfile=%s --title=%s.%s" %(pod_input, rst_output, title, man_ver) print cmd os.system(cmd) + +cleanup_db_man_pages_dir() +