doc4allmods 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/bash
  2. PACKAGE="$1"
  3. SKIP_PACKAGES="$PACKAGE tests management urls"
  4. SKIP_FILES="celery.five.rst
  5. celery.__main__.rst
  6. celery.task.rst
  7. celery.task.base.rst
  8. celery.task.sets.rst
  9. celery.bin.rst
  10. celery.bin.celeryd_detach.rst
  11. celery.contrib.rst
  12. celery.fixups.rst
  13. celery.fixups.django.rst
  14. celery.local.rst
  15. celery.app.base.rst
  16. celery.apps.rst
  17. celery.canvas.rst
  18. celery.concurrency.asynpool.rst
  19. celery.utils.encoding.rst"
  20. modules=$(find "$PACKAGE" -name "*.py")
  21. failed=0
  22. for module in $modules; do
  23. dotted=$(echo $module | sed 's/\//\./g')
  24. name=${dotted%.__init__.py}
  25. name=${name%.py}
  26. rst=$name.rst
  27. skip=0
  28. for skip_package in $SKIP_PACKAGES; do
  29. [ $(echo "$name" | cut -d. -f 2) == "$skip_package" ] && skip=1
  30. done
  31. for skip_file in $SKIP_FILES; do
  32. [ "$skip_file" == "$rst" ] && skip=1
  33. done
  34. if [ $skip -eq 0 ]; then
  35. if [ ! -f "docs/reference/$rst" ]; then
  36. if [ ! -f "docs/internals/reference/$rst" ]; then
  37. echo $rst :: FAIL
  38. failed=1
  39. fi
  40. fi
  41. fi
  42. done
  43. exit $failed