Re: Problem which Run Script
Re: Problem which Run Script
- Subject: Re: Problem which Run Script
- From: Alexander von Below <email@hidden>
- Date: Fri, 07 Nov 2014 22:31:23 +0100
`which` only finds things that are in your $PATH. Or, to be more specific, in the $PATH of the shell that is currently executing, and that may be the problem.
Where is appledoc? Is it in a standard directory, or did you (or a script, or anyone) add it to a $PATH somewhere? If the later, depending on where the $PATH was set, this may or may not carry over to the shell that Xcode is running.
So echo $PATH in your script, and see if that included the path to appledoc
If it does not, you could set $PATH deep enough for Xcode to pick it up.
An alternative would be to use `mdfind`
Hope this helps
Alex
Am 07.11.2014 um 21:44 schrieb Lorenzo Thurman <email@hidden>:
> 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@hidden)
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden