Hello, 

I develop on OSX and I found a few small issues in the build-apidoc.sh script.  
`readlink -f` isn't supported and a `find` was missing the directory argument.

How do these get tested/reviewed and into master?  I've signed and filed my 
contributor agreement already.

best, 

@gregburd, Basho Technologies | http://basho.com | @basho


13:51:02:cloudstack(gsb*+) $ git diff ./setup/apidoc/build-apidoc.sh 
(http://build-apidoc.sh)
diff --git a/setup/apidoc/build-apidoc.sh (http://build-apidoc.sh) 
b/setup/apidoc/build-apidoc.sh (http://build-apidoc.sh)
index 618273f..14d6459 100644
--- a/setup/apidoc/build-apidoc.sh (http://build-apidoc.sh)
+++ b/setup/apidoc/build-apidoc.sh (http://build-apidoc.sh)
@@ -27,8 +27,18 @@ shift
DISTDIR="$1"
shift

-thisdir=$(readlink -f $(dirname "$0"))
+canonical_readlink ()
+{
+ cd `dirname $1`;
+ __filename=`basename $1`;
+ if [ -h "$__filename" ]; then
+ canonical_readlink `readlink $__filename`;
+ else
+ echo "`pwd -P`";
+ fi
+}

+thisdir=$(canonical_readlink $0)

PATHSEP=':'
if [[ $OSTYPE == "cygwin" ]] ; then
@@ -61,7 +71,7 @@ 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)
+ python "$thisdir/gen_toc.py" $(find . -type f)

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




Reply via email to