summaryrefslogtreecommitdiff
path: root/utils/filtron.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-04-03 20:24:40 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-04-03 20:24:40 +0200
commit853be4e11cd8a82b6b08f04db1717329907a5aaf (patch)
treeee62e8a28ff64208d63f583409ff6b535b23e408 /utils/filtron.sh
parentaf988dbf71ce4b14d2056676d7d9691335266d83 (diff)
utils/filtron.sh: add generic documentation
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/filtron.sh')
-rwxr-xr-xutils/filtron.sh32
1 files changed, 27 insertions, 5 deletions
diff --git a/utils/filtron.sh b/utils/filtron.sh
index 208166fda..d2be60737 100755
--- a/utils/filtron.sh
+++ b/utils/filtron.sh
@@ -186,11 +186,7 @@ main() {
debug-off) echo; disable_debug ;;
*) usage "$_usage"; exit 42;;
esac ;;
- doc)
- echo
- echo ".. generic utils/filtron.sh documentation"
- ;;
-
+ doc) rst-doc ;;
*) usage "unknown or missing command $1"; exit 42;;
esac
}
@@ -469,6 +465,32 @@ This removes apache site ${APACHE_FILTRON_SITE}."
apache_remove_site "$APACHE_FILTRON_SITE"
}
+rst-doc() {
+
+ eval "echo \"$(< "${REPO_ROOT}/docs/build-templates/filtron.rst")\""
+
+ echo -e "\n.. START install systemd unit"
+ cat <<EOF
+.. tabs::
+
+ .. group-tab:: systemd
+
+ .. code:: bash
+
+EOF
+ eval "echo \"$(< "${TEMPLATES}/${SERVICE_SYSTEMD_UNIT}")\"" | prefix_stdout " "
+ echo -e "\n.. END install systemd unit"
+
+ # for DIST_NAME in ubuntu-20.04 arch fedora; do
+ # (
+ # DIST_ID=${DIST_NAME%-*}
+ # DIST_VERS=${DIST_NAME#*-}
+ # [[ $DIST_VERS =~ $DIST_ID ]] && DIST_VERS=
+ # # ...
+ # )
+ # done
+}
+
# ----------------------------------------------------------------------------
main "$@"
# ----------------------------------------------------------------------------