cleantree.sh 392 B

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