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~22 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=43dd8898bd8d82d526b6d56b9f6b2afd53af9162;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