cleantree.sh 433 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. # -*- coding: utf-8 -*-
  3. basedir="$(realpath "$0" | xargs dirname)"
  4. set -e
  5. if ! [ -x "$basedir/setup.py" ]; then
  6. echo "basedir sanity check failed"
  7. exit 1
  8. fi
  9. cd "$basedir"
  10. find . \( \
  11. \( -name '__pycache__' \) -o \
  12. \( -name '*.pyo' \) -o \
  13. \( -name '*.pyc' \) -o \
  14. \( -name '*$py.class' \) \
  15. \) -delete
  16. rm -f cms_cython
  17. rm -rf build dist .pybuild
  18. rm -f MANIFEST
  19. # vim: ts=4 sw=4 expandtab