mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge pull request #308 from whowutwut/release_Fix
Clean up WARNING message when building related to xcat2_release page
This commit is contained in:
commit
f30e547f31
@ -4,6 +4,8 @@ import glob
|
||||
import os
|
||||
import sys
|
||||
import subprocess
|
||||
from glob import glob
|
||||
import shutil
|
||||
|
||||
#TODO: Delete the old files to support removing a man page
|
||||
|
||||
@ -18,8 +20,37 @@ if not cmd_exists("pod2rst"):
|
||||
# the location relativate to xcat-core where the man pages will go
|
||||
MANPAGE_DEST="./docs/source/guides/admin-guides/references/man"
|
||||
|
||||
#
|
||||
# add the following to delete the generate files before creating them
|
||||
# essentially this allows us to remove man pages and they will be
|
||||
# removed in the generation
|
||||
print "Cleaning up the generated man pages in %s" %(MANPAGE_DEST)
|
||||
allfiles = glob("%s*/*.rst" %(MANPAGE_DEST))
|
||||
for d in allfiles:
|
||||
# Skip over the index.rst file
|
||||
if not "index.rst" in d:
|
||||
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)):
|
||||
@ -35,14 +66,7 @@ for component in COMPONENTS:
|
||||
# title is needed to pass to pod2rst
|
||||
title = filename.split('.')[0]
|
||||
|
||||
#
|
||||
# Wanted to have DESTINATION contain the man version,
|
||||
# but we currently have man1,man3,man5,man8, etc in
|
||||
# the .gitignore file. Need to fix Ubuntu builds
|
||||
#
|
||||
# DESTINATION = "%s%s" %(MANPAGE_DEST, man_ver)
|
||||
#
|
||||
DESTINATION = "%s" %(MANPAGE_DEST)
|
||||
DESTINATION = "%s%s" %(MANPAGE_DEST, man_ver)
|
||||
try:
|
||||
os.stat(DESTINATION)
|
||||
except:
|
||||
@ -56,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()
|
||||
|
||||
|
@ -0,0 +1,2 @@
|
||||
Hardware Discovery & Define Node
|
||||
================================
|
@ -0,0 +1,2 @@
|
||||
Diskful Installation
|
||||
====================
|
@ -0,0 +1,2 @@
|
||||
Diskless Installation
|
||||
=====================
|
@ -13,7 +13,10 @@ xCAT Man Pages
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
man/*
|
||||
man1/index.rst
|
||||
man3/index.rst
|
||||
man5/index.rst
|
||||
man8/index.rst
|
||||
|
||||
|
||||
xCAT Database Tables
|
||||
|
@ -0,0 +1,9 @@
|
||||
man1
|
||||
====
|
||||
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
:glob:
|
||||
|
||||
*
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user