From 52ffccff5f1436dd5762fcc90050aadaf82eedad Mon Sep 17 00:00:00 2001 From: Yitao Jiang Date: Thu, 12 Mar 2015 14:23:43 +0800 Subject: [PATCH] tools/apidoc: Fix the bug when build apidoc under windows cygwin environment This closes #114 Signed-off-by: Rohit Yadav --- tools/apidoc/build-apidoc.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/apidoc/build-apidoc.sh b/tools/apidoc/build-apidoc.sh index 03eb6874e12..dc3751ca246 100755 --- a/tools/apidoc/build-apidoc.sh +++ b/tools/apidoc/build-apidoc.sh @@ -62,7 +62,17 @@ set -e sed -e 's,%API_HEADER%,Root Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocforadmin.xsl sed -e 's,%API_HEADER%,Domain Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocfordomainadmin.xsl - python "$thisdir/gen_toc.py" $(find . -type f) + PLATFORM=`uname -s` + if [[ "$PLATFORM" =~ .*WIN.* ]] + then + gen_toc_file="`cygpath -w $thisdir`\\gen_toc.py" + for file in `find . -type f`; do + echo "Parse file $file"; + python $gen_toc_file $file; + done + else + python "$thisdir/gen_toc.py" $(find . -type f) + fi cat generatetocforuser_include.xsl >>generatetocforuser.xsl cat generatetocforadmin_include.xsl >>generatetocforadmin.xsl