2011-01-11 09:20:00 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
DESTINATION="sanity_config.php"
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
echo -n "\$requred_defines = array( " >> $DESTINATION
|
|
|
|
|
2011-01-24 09:18:39 +00:00
|
|
|
grep define\( config.php-dist | awk -F\' '{ print "*" $2 "*," }' | xargs echo -n | grep -v DB_PORT | sed -e s/,$// -e s/*/\'/g >> $DESTINATION
|
2011-01-11 09:20:00 +00:00
|
|
|
|
|
|
|
echo "); ?>" >> $DESTINATION
|
|
|
|
|
|
|
|
|