summaryrefslogtreecommitdiff
path: root/docs/reference/libtracker-sparql/dist-docs.sh
blob: 49e04aa8a17bdd0a33ca316d61269f32a5134f4d (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
#!/bin/sh
docs_name=$1

pushd ${MESON_SOURCE_ROOT}
files=`git clean -nx docs/reference/libtracker-sparql/theme-extra/`
if [ -n "$files" ]
then
  echo "Directory 'theme-extra' is unclean:"
  echo -e "$files"
  exit -1
fi
popd

pushd $MESON_BUILD_ROOT

# Ensure the build tree is compiled, we need generated files
ninja

# Run hotdoc manually
pushd docs/reference/libtracker-sparql
hotdoc run --conf-file ${docs_name}-doc.json

# Generate fixed .devhelp2 file
${MESON_SOURCE_ROOT}/docs/reference/libtracker-sparql/generate-devhelp.sh $1

# And copy the resulting devhelp documentation into the dist location
mv ${docs_name}-doc/devhelp/ ${MESON_DIST_ROOT}/docs/reference/libtracker-sparql/

# Delete the remaining docs
rm -rf ${docs_name}-doc/

popd
popd