Lorenzo,

add ‘echo $PATH’ to the top of your script. You’ll find that the path to 
appledoc is probably missing. Setting $PATH in scripts is a common practice 
when you’re not sure what the run-time environment will be.

My guess is the appledoc tool lives outside of /bin, /usr/bin, or 
/usr/local/bin which are the most common binary paths.

James




> On Nov 7, 2014, at 12:44 PM, Lorenzo Thurman <[email protected]> wrote:
> 
> I’m trying to get this script to run. It generates Documentation using the 
> VVDocumentor plugin using appledoc:
> 
> if [ ${CONFIGURATION} == "Release" ]; then
> APPLEDOC_PATH=`which appledoc`
> if [ $APPLEDOC_PATH ]; then
> echo "Here"
> $APPLEDOC_PATH \
> --project-name ${PRODUCT_NAME} \
> --project-company "Lorenzo Thurman" \
> --company-id "net.spikesoft" \
> --output ${PRODUCT_NAME}Docs \
> --keep-undocumented-objects \
> --keep-undocumented-members \
> --keep-intermediate-files \
> --no-repeat-first-par \
> --no-warn-invalid-crossref \
> --exit-threshold 2 \
> ${PROJECT_DIR}/${PRODUCT_NAME}
> fi;
> fi;
> 
> It fails to run because the ‘which’ command does not find the path to 
> appledoc (echo  $APPLEDOC_PATH prints nothing). Yes, in a Terminal ‘which 
> appledoc’ returns the correct path. I added #!/bin/sh at the first line 
> thinking that an interpreter might help, but no go. If I hard code the path 
> to appledoc, all is good and the docs are generated. So what’s the mojo to 
> get this to work. I’m perfectly fine with using a hard coded path, but I 
> figure at some point in the future, I might benefit from knowing why this 
> doesn’t work.
> Thanks
> 
> 
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Xcode-users mailing list      ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/xcode-users/hello%40jmoore.me
> 
> This email sent to [email protected]

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/xcode-users/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to