fixnotabfiles.sh 722 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. #------------------------------------------------------
  3. # Detect files that does not contains any tab inside
  4. #
  5. # Laurent Destailleur - eldy@users.sourceforge.net
  6. #------------------------------------------------------
  7. # Usage: fixnotabfiles.sh [list|fix]
  8. #------------------------------------------------------
  9. # Syntax
  10. if [ "x$1" != "xlist" -a "x$1" != "xfix" ]
  11. then
  12. echo "Detect .sh and .spec files that does not contains any tab inside"
  13. echo "Usage: fixnotabfiles.sh [list|fix]"
  14. fi
  15. # To detec
  16. if [ "x$1" = "xlist" ]
  17. then
  18. find build \( -iname "*.sh" -o -iname "*.spec" \) -exec grep -l -P '\t' {} \;
  19. fi
  20. # To convert
  21. if [ "x$1" = "xfix" ]
  22. then
  23. echo Feature not implemented. Please fix files manually.
  24. fi