Skip to content

Instantly share code, notes, and snippets.

@kartben
Created June 17, 2025 14:09
Show Gist options
  • Save kartben/18f4d1e6a5a45397d36227e8893718e5 to your computer and use it in GitHub Desktop.
Save kartben/18f4d1e6a5a45397d36227e8893718e5 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Start in current directory
root_dir=$(pwd)
# Find all unique directories containing Kconfig* files
find "$root_dir" -type f -name 'Kconfig*' -exec dirname {} \; | sort -u | while read dir; do
# Check if any Kconfig* file in the directory matches the pattern 'config .*_SHELL$'
if grep -E -q '^[[:space:]]*config .*_SHELL$' "$dir"/Kconfig*; then
# Check if the string SHELL_HELP is found anywhere in that directory
if ! grep -r -q 'SHELL_HELP' "$dir"; then
echo "$dir"
fi
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment