-
Notifications
You must be signed in to change notification settings - Fork 73
/
api.appledoc.sh
executable file
·45 lines (35 loc) · 1 KB
/
api.appledoc.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/sh
##
# USAGE
# ./api.appledoc.sh [version-string]
#
# Execute it from the root of the CDEvents project.
PROJECT_VERSION="HEAD"
if [ "$#" -gt "0" ]
then
PROJECT_VERSION=$1
fi
API_DOCS_DIR="./api/appledoc"
#HEADER_FILES=`find . -name '*.h'`
HEADER_FILES=`ls *.h`
echo "API documentation generator for CDEvents v1"
echo "Will save generated documentation to \"${API_DOCS_DIR}\""
echo "Removing old API documentation"
rm -r $API_DOCS_DIR/html 2> /dev/null
rm -r $API_DOCS_DIR/docset 2> /dev/null
echo "Will generate API documentation based on:"
echo ${HEADER_FILES}
echo "Generating for version \"${PROJECT_VERSION}\"..."
appledoc \
--output ${API_DOCS_DIR} \
--project-name "CDEvents" \
--project-version ${PROJECT_VERSION} \
--project-company "Aron Cedercrantz" \
--company-id "com.cedercrantz" \
--create-html \
--keep-intermediate-files \
--no-install-docset \
${HEADER_FILES}
echo "Done!"
echo "You can open the HTML documentation with:"
echo "\"open ${API_DOCS_DIR}/html/index.html\""