#!/bin/bash # Uncomment this to see the commands as they are run # set -x VERSION=1.3 git clone --depth=1 -b release-$VERSION https://github.com/kubernetes/kubernetes.git k8s cd k8s git remote add upstream https://github.com/kubernetes/kubernetes.git git fetch upstream hack/generate-docs.sh hack/update-generated-swagger-docs.sh build/versionize-docs.sh release-$VERSION cd .. rm -rf _includes/v$VERSION mkdir _includes/v$VERSION # batch fetches while read line || [[ -n ${line} ]]; do IFS=': ' read -a myarray <<< "${line}" if [ "${myarray[1]}" = "path" ]; then TARGET="${myarray[2]}" CLEARPATH="${TARGET}" K8SSOURCE='k8s/'${TARGET} DESTINATION=${TARGET%/*} rm -rf "${CLEARPATH}" yes | cp -rf "${K8SSOURCE}" "${DESTINATION}" fi if [ "${myarray[1]}" = "changedpath" ]; then SRC="${myarray[2]}" DESTINATION="${myarray[3]}" echo "mv -f ${SRC} ${DESTINATION}" yes | cp -rf "${SRC}" "${DESTINATION}" fi if [ "${myarray[1]}" = "copypath" ]; then K8SSOURCE="${myarray[2]}" DESTINATION="${myarray[3]}" echo "yes | cp -rf ${K8SSOURCE} ${DESTINATION}" yes | cp -rf "${K8SSOURCE}" "${DESTINATION}" fi done <_data/overrides.yml # refdoc munging pushd . cd _includes/v$VERSION # These are included in other files, so strip the DOCTYPE find . -name '*.html' -type f -exec sed -i -e "s///g" {} \; # Format html find . -name '*.html' -type f -exec sed -i -e '/