2011-01-11 09:20:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2011-12-12 06:29:06 +00:00
|
|
|
DESTINATION="include/sanity_config.php"
|
2011-01-11 09:20:00 +00:00
|
|
|
|
|
|
|
echo "<?php # This file has been generated at: " `date` > $DESTINATION
|
|
|
|
|
|
|
|
echo -n "define('GENERATED_CONFIG_CHECK', " >> $DESTINATION
|
|
|
|
grep CONFIG_VERSION config.php-dist | awk -F ' |)' '{ print $2 }' | xargs echo -n >> $DESTINATION
|
|
|
|
echo ");" >> $DESTINATION
|
|
|
|
|
2018-11-22 19:15:27 +00:00
|
|
|
echo -n "\$required_defines = array( " >> $DESTINATION
|
2011-01-11 09:20:00 +00:00
|
|
|
|
2011-01-30 16:01:29 +00:00
|
|
|
grep define\( config.php-dist | awk -F\' '{ print "*" $2 "*," }' | grep -v DB_PORT | xargs echo -n | sed -e s/,$// -e s/*/\'/g >> $DESTINATION
|
2011-01-11 09:20:00 +00:00
|
|
|
|
|
|
|
echo "); ?>" >> $DESTINATION
|
|
|
|
|
|
|
|
|