Blame build/config-stubs

Packit 90a5c9
#!/bin/sh
Packit 90a5c9
Packit 90a5c9
#
Packit 90a5c9
# Find all config files (config*.m4) and map them into lines with the
Packit 90a5c9
# form: NUM? '0' ' ' PATH
Packit 90a5c9
#
Packit 90a5c9
# For example:
Packit 90a5c9
#
Packit 90a5c9
#  50 ./modules/generators/config5.m4
Packit 90a5c9
#  0 ./modules/aaa/config.m4
Packit 90a5c9
#  10 ./example/config1.m4
Packit 90a5c9
#
Packit 90a5c9
# These lines are sorted, then the first field is removed. Thus, we
Packit 90a5c9
# have a set of paths sorted on the config-number (if present). All
Packit 90a5c9
# config files without a number are sorted before those with a number.
Packit 90a5c9
#
Packit 90a5c9
Packit 90a5c9
configfiles=`find os server modules support -name "config*.m4" | \
Packit 90a5c9
	sed 's#\(.*/config\)\(.*\).m4#\20 \1\2.m4#' | \
Packit 90a5c9
	sort | \
Packit 90a5c9
	sed 's#.* ##'`
Packit 90a5c9
Packit 90a5c9
for configfile in $configfiles; do
Packit 90a5c9
    if [ -r $configfile ]; then
Packit 90a5c9
        echo "sinclude($configfile)"
Packit 90a5c9
    fi
Packit 90a5c9
done