From edd69bf358567b58ed186ec4bb7d53558aad9233 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20Gagne=CC=81?= Date: Mon, 1 Dec 2014 15:13:28 -0500 Subject: [PATCH] Fix find_autodoc_modules.sh to support OSX 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 --- doc/find_autodoc_modules.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/find_autodoc_modules.sh b/doc/find_autodoc_modules.sh index fb7e451a0..9da7a40df 100755 --- a/doc/find_autodoc_modules.sh +++ b/doc/find_autodoc_modules.sh @@ -8,7 +8,7 @@ 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'` + relative=cinder.`echo ${x} | sed -e 's$^'${CINDER_DIR}'$$' -e 's/.py$//' -e 's$/$.$g' -e 's$^.$$'` modules="${modules} ${relative}" done -- 2.45.2