From: Andrew Dolgov Date: Tue, 13 Dec 2011 09:18:34 +0000 (+0400) Subject: fix generator of localized_schema.php X-Git-Tag: 1.5.8~21^2~8 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=c4c5cca12d92c439daec176b1b0e8381e8b49c15;p=tt-rss.git fix generator of localized_schema.php --- 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