doc4allmods 1.3 KB

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