0
0
mirror of https://github.com/zeromq/libzmq.git synced 2024-12-25 22:30:51 +08:00
libzmq/doc/create_page_list.sh
Francesco Montorsi 267e856494
Feature: master: integrate with ReadTheDocs (#4614)
* Feature: integrate libzmq with ReadTheDocs

* add readthedocs configuration file to convert Asciidoc files into HTML and HTMLZIP formats using Asciidoctor.js tool (the only Asciidoctor variant available on readthedocs so far)
2023-11-02 20:44:34 +00:00

21 lines
731 B
Bash
Executable File

#!/bin/bash
# This Bash snippet is used to automatically generate an alphabetical list included by index.adoc
# It's invoked by at least 2 callers:
# - the Makefile[.am] for automake builds
# - the ReadTheDocs pipeline, see .readthedocs.yaml
OUTPUT_FILE="$1"
ASCIIDOC_DIR="$2"
echo >$OUTPUT_FILE
for adocfile in $(ls ${ASCIIDOC_DIR}/*.adoc); do
adocfile_basename=$(basename ${adocfile})
# this script is used to produce an Asciidoc snippet that goes inside index.adoc... avoid listing index.adoc itself!
if [ "${adocfile_basename}" != "index.adoc" ]; then
adocfile_basename_noext=${adocfile_basename//.adoc/}
echo "* xref:${adocfile_basename}[${adocfile_basename_noext}]" >>$OUTPUT_FILE
fi
done