cleantree.sh 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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/pypy-awlsim \
  56. debian/pypy-awlsimhw-dummy \
  57. debian/pypy-awlsimhw-profibus \
  58. debian/pypy-awlsimhw-rpigpio \
  59. debian/pypy-awlsimhw-pixtend \
  60. debian/awlsim-client \
  61. debian/awlsim-server \
  62. debian/awlsim-symtab \
  63. debian/awlsim-test \
  64. debian/awlsim-linuxcnc-hal \
  65. debian/awlsim-gui \
  66. debian/awlsim-proupgrade