clean.sh 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. #!/bin/sh
  2. #
  3. # Attempt to remove as many generated files as we can.
  4. # Ideally, a well-used development sandbox would look like
  5. # a pristine checkout after running this script.
  6. #
  7. if [ \! -f build/version ]; then
  8. echo 'Must run the clean script from the top-level dir of the libarchive distribution' 1>&2
  9. exit 1
  10. fi
  11. # If we're on BSD, blow away the build dir under /usr/obj
  12. rm -rf /usr/obj`pwd`
  13. #
  14. # Try to clean up a bit more...
  15. #
  16. find . -name '*.So' | xargs rm -f
  17. find . -name '*.a' | xargs rm -f
  18. find . -name '*.la' | xargs rm -f
  19. find . -name '*.lo' | xargs rm -f
  20. find . -name '*.o' | xargs rm -f
  21. find . -name '*.orig' | xargs rm -f
  22. find . -name '*.po' | xargs rm -f
  23. find . -name '*.rej' | xargs rm -f
  24. find . -name '*~' | xargs rm -f
  25. find . -name '.depend' | xargs rm -f
  26. find . -name '.deps' | xargs rm -rf
  27. find . -name '.dirstamp' | xargs rm -f
  28. find . -name '.libs' | xargs rm -rf
  29. find . -name 'CMakeFiles' | xargs rm -rf
  30. find . -name 'cmake_install.cmake' | xargs rm -f
  31. find . -name 'CTestTestfile.cmake' | xargs rm -f
  32. rm -rf Testing
  33. rm -rf autom4te.cache
  34. rm -rf bin
  35. rm -rf cmake.tmp
  36. rm -rf libarchive/Testing
  37. rm -f CMakeCache.txt
  38. rm -f DartConfiguration.tcl
  39. rm -f Makefile
  40. rm -f Makefile.in
  41. rm -f aclocal.m4
  42. rm -f bsdcpio
  43. rm -f bsdcpio_test
  44. rm -f bsdtar
  45. rm -f bsdtar_test
  46. rm -f build/autoconf/compile
  47. rm -f build/autoconf/config.guess
  48. rm -f build/autoconf/config.sub
  49. rm -f build/autoconf/depcomp
  50. rm -f build/autoconf/install-sh
  51. rm -f build/autoconf/libtool.m4
  52. rm -f build/autoconf/ltmain.sh
  53. rm -f build/autoconf/ltoptions.m4
  54. rm -f build/autoconf/ltsugar.m4
  55. rm -f build/autoconf/ltversion.m4
  56. rm -f build/autoconf/lt~obsolete.m4
  57. rm -f build/autoconf/missing
  58. rm -f build/autoconf/test-driver
  59. rm -f build/pkgconfig/libarchive.pc
  60. rm -f build/version.old
  61. rm -f cat/test/list.h
  62. rm -f config.h
  63. rm -f config.h.in
  64. rm -f config.log
  65. rm -f config.status
  66. rm -f configure
  67. rm -f cpio/*.1.gz
  68. rm -f cpio/Makefile
  69. rm -f cpio/bsdcpio
  70. rm -f cpio/test/Makefile
  71. rm -f cpio/test/bsdcpio_test
  72. rm -f cpio/test/list.h
  73. rm -f doc/html/*
  74. rm -f doc/man/*
  75. rm -f doc/pdf/*
  76. rm -f doc/text/*
  77. rm -f doc/wiki/*
  78. rm -f libarchive/*.[35].gz
  79. rm -f libarchive/Makefile
  80. rm -f libarchive/libarchive.so*
  81. rm -f libarchive/test/Makefile
  82. rm -f libarchive/test/libarchive_test
  83. rm -f libarchive/test/list.h
  84. rm -f libarchive_test
  85. rm -f libtool
  86. rm -f stamp-h1
  87. rm -f tar/*.1.gz
  88. rm -f tar/Makefile
  89. rm -f tar/bsdtar
  90. rm -f tar/test/Makefile
  91. rm -f tar/test/bsdtar_test
  92. rm -f tar/test/list.h