From 8fc26c419b6b5f948f57b7a4ee9e27962d43af5e Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 11 Jan 2011 12:20:00 +0300 Subject: properly check whether all constants are defined in config.php --- utils/regen_config_checks.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 utils/regen_config_checks.sh (limited to 'utils/regen_config_checks.sh') diff --git a/utils/regen_config_checks.sh b/utils/regen_config_checks.sh new file mode 100755 index 000000000..78f2dbfba --- /dev/null +++ b/utils/regen_config_checks.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +DESTINATION="sanity_config.php" + +echo " $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 + + -- cgit v1.2.3