tools/docgen.sh
author sheepluva
Sun, 14 Dec 2014 02:37:30 +0100
changeset 10667 5bd2fa61f25b
parent 6203 38ddad39f08f
child 11515 4dd77731453b
permissions -rwxr-xr-x
remove links from doxygen project number as doxygen escapes them now
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6203
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     1
#!/bin/sh
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     2
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     3
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     4
if [ -d QTfrontend ]; then
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     5
	cd QTfrontend
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     6
else
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     7
	if [ -d ../QTfrontend ]; then
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     8
		cd ../QTfrontend
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
     9
	else
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    10
		echo 'abort: Directory "QTfrontend" not found!' >&2
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    11
		exit 1
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    12
	fi
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    13
fi
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    14
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    15
if [ -z "$1" ]; then
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    16
	OUTPUT_DIRECTORY="../doc/QTfrontend"
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    17
else
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    18
	OUTPUT_DIRECTORY="$1"
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    19
fi
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    20
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    21
echo "Creating documentation for Qt-Frontend in $OUTPUT_DIRECTORY ..."
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    22
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    23
if [ $(which hg) ]; then
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    24
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    25
branch=$(hg identify -b)
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    26
rev=$(hg identify -rdefault -i)
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    27
10667
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    28
#branchurl="<a href=http://code.google.com/p/hedgewars/source/list?name=${branch}>${branch}</a>"
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    29
#revurl="<a href=http://code.google.com/p/hedgewars/source/detail?r=${rev}>${rev}</a>"
6203
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    30
10667
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    31
branchurl="$branch"
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    32
revurl="$rev"
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    33
5bd2fa61f25b remove links from doxygen project number as doxygen escapes them now
sheepluva
parents: 6203
diff changeset
    34
export PROJECT_NUMBER="${branchurl} branch, ${revurl}"
6203
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    35
export OUTPUT_DIRECTORY
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    36
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    37
fi
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    38
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    39
doxygen
38ddad39f08f adding simple doc build script
sheepluva
parents:
diff changeset
    40
exit $?