Skip to content

Commit

Permalink
docs: avoid copying non existent files & counter readme (backport #18487
Browse files Browse the repository at this point in the history
) (#18490)

Co-authored-by: Marko <[email protected]>
  • Loading branch information
mergify[bot] and tac0turtle authored Nov 16, 2023
1 parent 50fb4fa commit 2e48b8e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
## Create modules pages
for D in ../x/*; do
if [ -d "${D}" ]; then
MODDOC=docs/build/modules/$(echo $D | awk -F/ '{print $NF}')
rm -rf $MODDOC
mkdir -p $MODDOC && cp -r $D/README.md "$_"
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"
fi
fi
done

Expand Down

0 comments on commit 2e48b8e

Please sign in to comment.