From b5ee26f24514e83898d11b7d9797f2e2d9310e0f Mon Sep 17 00:00:00 2001 From: Ask Solem Date: Thu, 5 Aug 2010 18:15:36 +0200 Subject: [PATCH] Release tools --- contrib/release/doc4allmods | 39 +++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100755 contrib/release/doc4allmods diff --git a/contrib/release/doc4allmods b/contrib/release/doc4allmods new file mode 100755 index 00000000..0a7a6a4a --- /dev/null +++ b/contrib/release/doc4allmods @@ -0,0 +1,39 @@ +#!/bin/bash + +PACKAGE="$1" +SKIP_PACKAGES="$PACKAGE tests management urls" +SKIP_FILES="celery.bin.rst celery.contrib.rst + celery.contrib.batches.rst + celery.models.rst + celery.concurrency.rst + celery.db.rst + celery.db.a805d4bd.rst + celery.db.dfd042c7.rst" + +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