#!/bin/sh set -o errexit set -o nounset set -o pipefail BASE=$(cd "$(dirname "$0")" ; pwd -P)/.. ISTIOCTL=${ISTIOCTL:-istioctl} ISTIOCTL_DIR=$(readlink -f ${BASE}/_docs/reference/istioctl/) function commandHeader() { title=${1} overview=${2} order=${3} cat < ${out} cp ${out} ${file} # Rename markdown links to html equivalent. sed -i 's|\(\[.*\]\)(\(.*\).md)|\1(\2.html)|' ${file} done # Generate main index last so it isn't patched by previous steps. generateIndex 0 > ${ISTIOCTL_DIR}/index.md