1
0
mirror of https://tt-rss.org/git/tt-rss.git synced 2024-06-30 12:30:52 +02:00
ttrss/utils/regen_config_checks.sh
Andrew Dolgov 65254f5db4 - move sphinx plugin to a separate repo
- regenerate config checks without sphinx-related variables
2020-12-11 09:48:34 +03:00

18 lines
541 B
Bash
Executable File

#!/bin/sh
DESTINATION="include/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 "\$required_defines = array( " >> $DESTINATION
grep define\( config.php-dist | awk -F\' '{ print "*" $2 "*," }' | grep -v DB_PORT | xargs echo -n | sed -e s/,$// -e s/*/\'/g >> $DESTINATION
echo "); ?>" >> $DESTINATION