Skip to content

Commit

Permalink
docs: avoid copying non existent files & counter readme (#18487)
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle authored Nov 16, 2023
1 parent 1182db7 commit 7a28425
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions docs/pre.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,17 @@
## Create modules pages
for D in ../x/*; do
if [ -d "${D}" ]; then
MODDOC=build/modules/$(echo $D | awk -F/ '{print $NF}')
rm -rf $MODDOC
mkdir -p $MODDOC && cp -r $D/README.md "$_"
DIR_NAME=$(basename "$D")

# Skip specific directories
if [[ "$DIR_NAME" != "counter" ]]; then
MODULE_DIRECTORY=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
fi
done

Expand Down

0 comments on commit 7a28425

Please sign in to comment.