2 # This script checks the compat-wireless configuration file and if changes were made
3 # regenerates the compat_autoconf header.
5 # These variables are expected to be exported:
6 #COMPAT_CONFIG="config"
7 #CONFIG_CHECK=".${COMPAT_CONFIG}.md5"
8 #COMPAT_AUTOCONF="include/linux/compat_autoconf.h"
10 function gen_compat_autoconf {
11 echo "./scripts/gen-compat-autoconf.sh $COMPAT_CONFIG > $COMPAT_AUTOCONF"
12 ./scripts/gen-compat-autoconf.sh $COMPAT_CONFIG > $COMPAT_AUTOCONF
13 md5sum $COMPAT_CONFIG > $CONFIG_CHECK
16 which md5sum 2>&1 > /dev/null
18 echo "md5sum required to detect changes on config file"
22 if [ ! -f $CONFIG_CHECK ]; then
27 md5sum -c $CONFIG_CHECK 2> /dev/null 1>/dev/null
30 echo "Changes to compat-wireless's configuration was detected, regenerating autoconf..."