From c77af93cab40ce35af20541f3cbe21ff4c35c037 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Thu, 16 Nov 2023 17:43:36 +0100 Subject: [PATCH] fix script --- docs/pre.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/pre.sh b/docs/pre.sh index 42ae679f975a..fe41da35d06b 100755 --- a/docs/pre.sh +++ b/docs/pre.sh @@ -3,15 +3,17 @@ ## Create modules pages for D in ../x/*; do if [ -d "${D}" ]; then - MODULE_DIRECTORY=docs/build/modules/$DIR_NAME - rm -rf "$MODULE_DIRECTORY" - mkdir -p "$MODULE_DIRECTORY" - if [ -f "$D"/README.md ]; then - cp -r "$D"/README.md "$MODULE_DIRECTORY" + DIR_NAME=$(echo $D | awk -F/ '{print $NF}') + MODDOC=docs/build/modules/$DIR_NAME + rm -rf $MODDOC + mkdir -p $MODDOC + if [ -f "$D/README.md" ]; then + cp -r $D/README.md $MODDOC/ fi fi done + ## Vesting is a submodule of auth, but we still want to display it in docs ## TODO to be removed in https://github.com/cosmos/cosmos-sdk/issues/9958 cp ../x/auth/vesting/README.md ./docs/build/modules/auth/1-vesting.md