summaryrefslogtreecommitdiff
path: root/doc/release.sh.in
blob: 6a7d09a072285c2a753bc3d033eeca57c6de7e8a (plain)
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
#! /usr/bin/env bash
(
cd $(dirname $(which "$0")) || exit 1

distdir="@PROJECT_NAME@-@PROJECT_VERSION@-doc"
[ -z $MAKE ] && MAKE=make

# Clean up
rm -Rf "${distdir}" "${distdir}.zip"

# Generate
"${MAKE}" -C .. doc || exit 1

# Copy
mkdir -p "${distdir}/html/search"
cp \
	html/*.css \
	html/*.html \
	html/*.js \
	html/*.md5 \
	html/*.png \
	\
	"${distdir}/html/" || exit 1
cp -R html/search/ "${distdir}/html/" || exit 1

# Package
zip -r "${distdir}.zip" "${distdir}" || exit 1

cat <<INFO
=================================================
${distdir} archives ready for distribution:
${distdir}.zip
=================================================

INFO

# Clean up
rm -Rf "${distdir}"

)
exit $?