Source

SOExtendedAttributes / Documentation / appledoc.sh

#!/bin/bash
#
# Generate an Xcode docset using appledoc
#
# I use Xcode-compatible variable names where possible to facilitate
# running the script from an Xcode run script phase as well as a command line.
#
#set -x
#
set -e

: ${APPLEDOC:=/usr/local/bin/appledoc}
: ${APPLEDOC_OUTPUT:=./Documentation}
: ${PROJECT_DIR:=../}
: ${PROJECT_NAME:="SOExtendedAttributes"}
: ${BUILD_VERSION:="1.0"}

if [ -z ${APPLEDOC} ] || ! [ -x ${APPLEDOC} ]; then
echo "error: can't find the appledoc binary at $APPLEDOC"
exit -1
fi

# Set working directory to the project root
#
cd ${PROJECT_DIR}
echo "working directory: $PWD"

# Run the system's appledoc tool, specifying paths relative to the project root
#
printf "Using appledoc from %s\n" ${APPLEDOC}

${APPLEDOC} \
--project-name="SOExtendedAttributes" \
--project-version=${BUILD_VERSION} \
--project-company="Standard Orbit" \
--company-id="net.standardorbit" \
--logformat="xcode" \
--no-repeat-first-par \
--no-warn-invalid-crossref \
--ignore="Documentation" \
--ignore="UnitTests" \
--ignore="SOLoggerDemo" \
--keep-intermediate-files \
--create-docset \
--install-docset \
--docset-install-path="Documentation" \
--docset-bundle-name="SOExtendedAttributes" \
--docset-desc="SOExtendedAttributes defines cateogry on NSURL for manipulating extended attributes on a file system object." \
--print-settings \
--verbose=4 \
--output=${TMPDIR}appledoc-${PROJECT_NAME} \
--clean-output \
$PWD
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.