From c4c5cca12d92c439daec176b1b0e8381e8b49c15 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 13 Dec 2011 13:18:34 +0400 Subject: [PATCH] fix generator of localized_schema.php --- utils/update-schema-translations.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/utils/update-schema-translations.sh b/utils/update-schema-translations.sh index dff44650..663f5a9a 100755 --- a/utils/update-schema-translations.sh +++ b/utils/update-schema-translations.sh @@ -2,17 +2,18 @@ BASENAME=`basename $0` TMPFILE="/tmp/$BASENAME-$$.tmp" +OUTFILE="include/localized_schema.php" cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $8 }' > $TMPFILE cat schema/ttrss_schema_pgsql.sql | grep 'insert.*pref_name' | awk -F\' '{ print $6 }' >> $TMPFILE -echo " localized_schema.php -echo >> localized_schema.php -cat utils/localized_schema.txt >> localized_schema.php -echo >> localized_schema.php +echo " $OUTFILE +echo >> $OUTFILE +cat utils/localized_schema.txt >> $OUTFILE +echo >> $OUTFILE -cat $TMPFILE | grep -v '^$' | sed "s/.*/__('&');/" >> localized_schema.php +cat $TMPFILE | grep -v '^$' | sed "s/.*/__('&');/" >> $OUTFILE -echo "?>" >> localized_schema.php +echo "?>" >> $OUTFILE rm $TMPFILE -- 2.39.5