100-build_clean.patch 906 B

1234567891011121314151617181920212223242526272829303132333435
  1. --- a/ipkg-build
  2. +++ b/ipkg-build
  3. @@ -47,6 +47,19 @@ pkg_appears_sane() {
  4. PKG_ERROR=0
  5. + cvs_dirs=`find . -name 'CVS'`
  6. + if [ -n "$cvs_dirs" ]; then
  7. + if [ "$noclean" = "1" ]; then
  8. + echo "*** Warning: The following CVS directories where found.
  9. +You probably want to remove them: " >&2
  10. + ls -ld $cvs_dirs
  11. + echo >&2
  12. + else
  13. + echo "*** Removing the following files: $cvs_dirs"
  14. + rm -rf "$cvs_dirs"
  15. + fi
  16. + fi
  17. +
  18. tilde_files=`find . -name '*~'`
  19. if [ -n "$tilde_files" ]; then
  20. if [ "$noclean" = "1" ]; then
  21. @@ -134,8 +147,12 @@ You probably want to chown these to a sy
  22. for script in $CONTROL/preinst $CONTROL/postinst $CONTROL/prerm $CONTROL/postrm; do
  23. if [ -f $script -a ! -x $script ]; then
  24. + if [ "$noclean" = "1" ]; then
  25. echo "*** Error: package script $script is not executable" >&2
  26. PKG_ERROR=1
  27. + else
  28. + chmod a+x $script
  29. + fi
  30. fi
  31. done