cleantree.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #!/bin/sh
  2. basedir="$(dirname "$0")"
  3. [ "$(echo "$basedir" | cut -c1)" = '/' ] || basedir="$PWD/$basedir"
  4. awlsim_base="$basedir/.."
  5. set -e
  6. if ! [ -x "$awlsim_base/awlsim-test" -a -x "$awlsim_base/setup.py" ]; then
  7. echo "basedir sanity check failed"
  8. exit 1
  9. fi
  10. cd "$awlsim_base"
  11. find . \( \
  12. \( -name '__pycache__' \) -o \
  13. \( -name '*.pyo' \) -o \
  14. \( -name '*.pyc' \) -o \
  15. \( -name '*$py.class' \) \
  16. \) -delete
  17. rm -rf build dist .pybuild
  18. rm -f MANIFEST
  19. rm -f *.html
  20. find ./doc -name '*.html' -delete
  21. rm -rf tests/build
  22. find ./tests -name '__init__.py' -delete
  23. rm -f debian/files \
  24. debian/*.debhelper \
  25. debian/*.log \
  26. debian/*.substvars \
  27. debian/debhelper-build-stamp
  28. rm -rf debian/destdir-* \
  29. debian/python-awlsim \
  30. debian/python-awlsimhw-dummy \
  31. debian/python-awlsimhw-linuxcnc \
  32. debian/python-awlsimhw-profibus \
  33. debian/python-awlsimhw-rpigpio \
  34. debian/python-awlsimhw-pixtend \
  35. debian/python-awlsim-gui \
  36. debian/cython-awlsim \
  37. debian/cython-awlsimhw-dummy \
  38. debian/cython-awlsimhw-linuxcnc \
  39. debian/cython-awlsimhw-profibus \
  40. debian/cython-awlsimhw-rpigpio \
  41. debian/cython-awlsimhw-pixtend \
  42. debian/python3-awlsim \
  43. debian/python3-awlsim-gui \
  44. debian/python3-awlsimhw-dummy \
  45. debian/python3-awlsimhw-linuxcnc \
  46. debian/python3-awlsimhw-profibus \
  47. debian/python3-awlsimhw-rpigpio \
  48. debian/python3-awlsimhw-pixtend \
  49. debian/cython3-awlsim \
  50. debian/cython3-awlsimhw-dummy \
  51. debian/cython3-awlsimhw-linuxcnc \
  52. debian/cython3-awlsimhw-profibus \
  53. debian/cython3-awlsimhw-rpigpio \
  54. debian/cython3-awlsimhw-pixtend \
  55. debian/awlsim-client \
  56. debian/awlsim-server \
  57. debian/awlsim-symtab \
  58. debian/awlsim-test \
  59. debian/awlsim-linuxcnc-hal \
  60. debian/awlsim-gui \
  61. debian/awlsim-proupgrade