cleantree.sh 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 -f debian/files \
  22. debian/*.debhelper \
  23. debian/*.log \
  24. debian/*.substvars \
  25. debian/debhelper-build-stamp
  26. rm -rf debian/destdir-* \
  27. debian/python-awlsim \
  28. debian/python-awlsimhw-dummy \
  29. debian/python-awlsimhw-linuxcnc \
  30. debian/python-awlsimhw-profibus \
  31. debian/python-awlsimhw-rpigpio \
  32. debian/python-awlsimhw-pixtend \
  33. debian/python-awlsim-gui \
  34. debian/cython-awlsim \
  35. debian/cython-awlsimhw-dummy \
  36. debian/cython-awlsimhw-linuxcnc \
  37. debian/cython-awlsimhw-profibus \
  38. debian/cython-awlsimhw-rpigpio \
  39. debian/cython-awlsimhw-pixtend \
  40. debian/python3-awlsim \
  41. debian/python3-awlsim-gui \
  42. debian/python3-awlsimhw-dummy \
  43. debian/python3-awlsimhw-linuxcnc \
  44. debian/python3-awlsimhw-profibus \
  45. debian/python3-awlsimhw-rpigpio \
  46. debian/python3-awlsimhw-pixtend \
  47. debian/cython3-awlsim \
  48. debian/cython3-awlsimhw-dummy \
  49. debian/cython3-awlsimhw-linuxcnc \
  50. debian/cython3-awlsimhw-profibus \
  51. debian/cython3-awlsimhw-rpigpio \
  52. debian/cython3-awlsimhw-pixtend \
  53. debian/pypy-awlsim \
  54. debian/pypy-awlsimhw-dummy \
  55. debian/pypy-awlsimhw-profibus \
  56. debian/pypy-awlsimhw-rpigpio \
  57. debian/pypy-awlsimhw-pixtend \
  58. debian/awlsim-client \
  59. debian/awlsim-server \
  60. debian/awlsim-symtab \
  61. debian/awlsim-test \
  62. debian/awlsim-linuxcnc-hal \
  63. debian/awlsim-gui \
  64. debian/awlsim-proupgrade