configtest.sh 406 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. RED='\033[0;31m'
  3. BOLDRED='\033[1;31m'
  4. GREEN='\033[0;32m'
  5. CLEAR='\033[0m'
  6. ret=0
  7. for cfg in $(find config/ -type f -iname *.conf)
  8. do
  9. printf "%s: " $cfg
  10. errors=$(./build/megapixels-configlint "$cfg" 2>&1)
  11. if [ -z "$errors" ] ; then
  12. echo -e "${GREEN}PASS${CLEAR}"
  13. else
  14. ret=1
  15. echo -e "${BOLDRED}FAIL${CLEAR}"
  16. echo -e "${RED}$errors${CLEAR}"
  17. echo ""
  18. fi
  19. done
  20. exit $ret