
When running 'find cinder/' on OSX platforms, all returned paths will have 2 slashes (//). Because the script only strips the first slash as per the CINDER_DIR value, we end up with module names such as "cinder..db.api" in the documentation. This change trims the leading dot if found to avoid this situation. Change-Id: I9423b253d9842295850f469757e928bf5856967a
21 lines
481 B
Bash
Executable File
21 lines
481 B
Bash
Executable File
#!/bin/bash
|
|
|
|
CINDER_DIR='cinder/' # include trailing slash
|
|
DOCS_DIR='source'
|
|
|
|
modules=''
|
|
for x in `find ${CINDER_DIR} -name '*.py' | grep -v cinder/tests`; do
|
|
if [ `basename ${x} .py` == "__init__" ] ; then
|
|
continue
|
|
fi
|
|
relative=cinder.`echo ${x} | sed -e 's$^'${CINDER_DIR}'$$' -e 's/.py$//' -e 's$/$.$g' -e 's$^.$$'`
|
|
modules="${modules} ${relative}"
|
|
done
|
|
|
|
for mod in ${modules} ; do
|
|
if [ ! -f "${DOCS_DIR}/${mod}.rst" ];
|
|
then
|
|
echo ${mod}
|
|
fi
|
|
done
|