kombu/contrib/release/doc4allmods

34 lines
781 B
Plaintext
Raw Normal View History

2010-08-05 16:15:36 +00:00
#!/bin/bash
PACKAGE="$1"
SKIP_PACKAGES="$PACKAGE tests management urls"
2011-01-20 11:18:27 +00:00
SKIP_FILES="kombu.utils.eventio.rst"
2010-08-05 16:15:36 +00:00
modules=$(find "$PACKAGE" -name "*.py")
failed=0
for module in $modules; do
dotted=$(echo $module | sed 's/\//\./g')
name=${dotted%.__init__.py}
name=${name%.py}
rst=$name.rst
skip=0
for skip_package in $SKIP_PACKAGES; do
[ $(echo "$name" | cut -d. -f 2) == "$skip_package" ] && skip=1
done
for skip_file in $SKIP_FILES; do
[ "$skip_file" == "$rst" ] && skip=1
done
if [ $skip -eq 0 ]; then
if [ ! -f "docs/reference/$rst" ]; then
if [ ! -f "docs/internals/reference/$rst" ]; then
echo $rst :: FAIL
failed=1
fi
fi
fi
done
exit $failed