Skip to content

Instantly share code, notes, and snippets.

@pamaury
Created November 7, 2016 16:04
Show Gist options
  • Save pamaury/2ff88a35c5866d2cd62e8a796f297447 to your computer and use it in GitHub Desktop.
Save pamaury/2ff88a35c5866d2cd62e8a796f297447 to your computer and use it in GitHub Desktop.
#!/bin/bash
# run from root of repository
# create a list of all button names
BTN_LIST=$(grep -RE '#define[[:space:]]*BUTTON_[[:alnum:]]+[[:space:]]+[[:xdigit:]xX]+' firmware/ | awk '{ print($2) }' | sort | uniq)
BTN_LIST=$(echo "$BTN_LIST" | awk 'BEGIN { list = ""; } {list = list " " $0; } END { print(list); }')
echo "Button list: $BTN_LIST"
# ask the script which ones are defined for each target
./check_defines.sh ../www/buildserver/builds $BTN_LIST
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment