2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-02 19:05:32 +00:00

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
This commit is contained in:
Victor Hu
2015-10-23 22:54:36 -04:00
parent a464fb3048
commit 163d515367

View File

@ -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()