summaryrefslogtreecommitdiff
path: root/utils/morty.sh
diff options
context:
space:
mode:
authorMarkus Heiser <markus.heiser@darmarit.de>2020-04-03 20:26:20 +0200
committerMarkus Heiser <markus.heiser@darmarit.de>2020-04-03 20:26:20 +0200
commite32b08f61681da42104bc94b7b3266e41a79c58b (patch)
tree23e91297686f15132e6bd6657c4a0340606eb776 /utils/morty.sh
parent853be4e11cd8a82b6b08f04db1717329907a5aaf (diff)
downloadsearxng-e32b08f61681da42104bc94b7b3266e41a79c58b.tar.gz
searxng-e32b08f61681da42104bc94b7b3266e41a79c58b.zip
utils/morty.sh: add generic documentation
Signed-off-by: Markus Heiser <markus.heiser@darmarit.de>
Diffstat (limited to 'utils/morty.sh')
-rwxr-xr-xutils/morty.sh33
1 files changed, 28 insertions, 5 deletions
diff --git a/utils/morty.sh b/utils/morty.sh
index e6e14be8a..ec1d47cb6 100755
--- a/utils/morty.sh
+++ b/utils/morty.sh
@@ -194,11 +194,7 @@ main() {
debug-off) disable_debug ;;
*) usage "$_usage"; exit 42;;
esac ;;
- doc)
- echo
- echo ".. generic utils/morty.sh documentation"
- ;;
-
+ doc) rst-doc ;;
*) usage "ERROR: unknown or missing command $1"; exit 42;;
esac
}
@@ -436,6 +432,33 @@ This removes apache site ${APACHE_MORTY_SITE}."
apache_remove_site "$APACHE_MORTY_SITE"
}
+rst-doc() {
+
+ eval "echo \"$(< "${REPO_ROOT}/docs/build-templates/morty.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 "$@"
# ----------------------------------------------------------------------------