#!/bin/sh1#***************************************************************************2# _ _ ____ _3# Project ___| | | | _ \| |4# / __| | | | |_) | |5# | (__| |_| | _ <| |___6# \___|\___/|_| \_\_____|7#8# Copyright (C) Daniel Stenberg, <[email protected]>, et al.9#10# This software is licensed as described in the file COPYING, which11# you should have received as part of this distribution. The terms12# are also available at https://curl.se/docs/copyright.html.13#14# You may opt to use, copy, modify, merge, publish, distribute and/or sell15# copies of the Software, and permit persons to whom the Software is16# furnished to do so, under the terms of the COPYING file.17#18# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY19# KIND, either express or implied.20#21# SPDX-License-Identifier: curl22#23###########################################################################24#25# Documentation build script for the OS/400.26#272829SCRIPTDIR=$(dirname "${0}")30. "${SCRIPTDIR}/initscript.sh"3132[ -n "${PASEPERL}" ] || exit 0 # Perl needed for doc build.33cd "${TOPDIR}/docs" || exit 134[ -d "${IFSDIR}/docs" ] || mkdir "${IFSDIR}/docs"353637# Command line options.3839(40cd cmdline-opts || exit 141MANPAGE=curl.142TEXTPAGE=curl.txt43get_make_vars Makefile.inc44rm -f "${IFSDIR}/docs/${MANPAGE}" "${IFSDIR}/docs/${TEXTPAGE}"4546# Prepare online manual.47# shellcheck disable=SC208648${PASEPERL} "${TOPDIR}/scripts/managen" -c 75 \49listhelp ${DPAGES} > "${TOPDIR}/src/tool_listhelp.c"5051# Generate text manual and copy it to DB2.52# shellcheck disable=SC208653${PASEPERL} "${TOPDIR}/scripts/managen" -I "${TOPDIR}/include" \54-c 75 ascii ${DPAGES} > "${IFSDIR}/docs/${TEXTPAGE}"55MEMBER="${LIBIFSNAME}/DOCS.FILE/MANUAL.MBR"56CMD="CPY OBJ('${IFSDIR}/docs/${TEXTPAGE}') TOOBJ('${MEMBER}')"57CMD="${CMD} TOCCSID(${TGTCCSID}) DTAFMT(*TEXT) REPLACE(*YES)"58CLcommand "${CMD}"5960# Man page is useless as OS/400 has no man command.61# # shellcheck disable=SC208662# ${PASEPERL} "${TOPDIR}/scripts/managen" -I "${TOPDIR}/include" \63# mainpage ${DPAGES} > "${IFSDIR}/docs/${MANPAGE}"64)656667