2010-11-29 11:08:31 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2013-03-24 12:13:42 +01:00
|
|
|
LC_ALL=C
|
|
|
|
LANG=C
|
|
|
|
LANGUAGE=C
|
|
|
|
|
2010-11-29 11:08:31 +01:00
|
|
|
BASENAME=`basename $0`
|
|
|
|
TMPFILE="/tmp/$BASENAME-$$.tmp"
|
2011-12-13 10:18:34 +01:00
|
|
|
OUTFILE="include/localized_schema.php"
|
2010-11-29 11:08:31 +01:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2011-12-13 10:18:34 +01:00
|
|
|
echo "<?php # This file has been generated at: " `date` > $OUTFILE
|
|
|
|
echo >> $OUTFILE
|
|
|
|
cat utils/localized_schema.txt >> $OUTFILE
|
|
|
|
echo >> $OUTFILE
|
2010-11-29 11:08:31 +01:00
|
|
|
|
2011-12-13 10:18:34 +01:00
|
|
|
cat $TMPFILE | grep -v '^$' | sed "s/.*/__('&');/" >> $OUTFILE
|
2010-11-29 11:08:31 +01:00
|
|
|
|
2011-12-13 10:18:34 +01:00
|
|
|
echo "?>" >> $OUTFILE
|
2010-11-29 11:08:31 +01:00
|
|
|
|
|
|
|
rm $TMPFILE
|