1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 19:15:56 +00:00

properly check whether all constants are defined in config.php

This commit is contained in:
Andrew Dolgov
2011-01-11 12:20:00 +03:00
parent 0efa586a10
commit 8fc26c419b
3 changed files with 31 additions and 0 deletions

17
utils/regen_config_checks.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/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
grep define\( config.php-dist | awk -F\' '{ print "*" $2 "*," }' | xargs echo -n | sed -e s/,$// -e s/*/\'/g >> $DESTINATION
echo "); ?>" >> $DESTINATION