Skip to content

Commit 52ffccf

Browse files
Yitao Jiangyadvr
authored andcommitted
tools/apidoc: Fix the bug when build apidoc under windows cygwin environment
This closes apache#114 Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent 78fd8cf commit 52ffccf

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎tools/apidoc/build-apidoc.sh‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,17 @@ set -e
6262
sed -e 's,%API_HEADER%,Root Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocforadmin.xsl
6363
sed -e 's,%API_HEADER%,Domain Admin API,g' "$thisdir/generatetoc_header.xsl" >generatetocfordomainadmin.xsl
6464

65-
python "$thisdir/gen_toc.py" $(find . -type f)
65+
PLATFORM=`uname -s`
66+
if [[ "$PLATFORM" =~ .*WIN.* ]]
67+
then
68+
gen_toc_file="`cygpath -w $thisdir`\\gen_toc.py"
69+
for file in `find . -type f`; do
70+
echo "Parse file $file";
71+
python $gen_toc_file $file;
72+
done
73+
else
74+
python "$thisdir/gen_toc.py" $(find . -type f)
75+
fi
6676

6777
cat generatetocforuser_include.xsl >>generatetocforuser.xsl
6878
cat generatetocforadmin_include.xsl >>generatetocforadmin.xsl

0 commit comments

Comments
 (0)