check_configs.sh 323 B

123456789
  1. #!/bin/bash
  2. # Little script to find possibly-misnamed CONFIG lines
  3. for CONF in PICO_CONFIG PICO_CMAKE_CONFIG PICO_BUILD_DEFINE; do
  4. for DEF in $(git grep "$CONF:" | sed -n "s/.*$CONF: \+\(\w\+\).*/\1/p"); do
  5. if [ $(git grep "$DEF" | wc -l) -lt 2 ]; then
  6. echo "$CONF: $DEF only appears once"
  7. fi
  8. done
  9. done