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
|
2020-12-11 06:48:34 +00:00
|
|
|
grep CONFIG_VERSION config.php-dist | awk -F ' |\)' '{ print $2 }' | xargs echo -n >> $DESTINATION
|
2011-01-11 09:20:00 +00:00
|
|
|
echo ");" >> $DESTINATION
|
|
|
|
|
2021-02-22 11:41:09 +00:00
|
|
|
echo -n "function get_required_defines() { return [ " >> $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
|
|
|
|
2021-02-22 11:41:09 +00:00
|
|
|
echo "]; }" >> $DESTINATION
|
2011-01-11 09:20:00 +00:00
|
|
|
|
|
|
|
|