|
Last change
on this file was 2894, checked in by ivalkov, 11 years ago |
|
scripts/xml-stats/print.sh: Поправка на връзките към DamnedLies.
|
-
Property svn:executable
set to
*
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | #!/bin/bash
|
|---|
| 2 | # http://l10n.gnome.org/languages/bg/ - editions
|
|---|
| 3 | # gnome-3-0, freedesktop-org, gnome-gimp, etc
|
|---|
| 4 |
|
|---|
| 5 | # When errors occur see the XML Interfaces section in https://wiki.gnome.org/DamnedLies
|
|---|
| 6 |
|
|---|
| 7 | TMP=`mktemp`
|
|---|
| 8 | CP="/usr/share/java/xalan-j2.jar:/usr/share/java/xalan-j2-serializer.jar:/usr/share/java/bsf.jar:/usr/share/java/commons-logging.jar:/usr/share/java/js.jar"
|
|---|
| 9 | ED=$1; shift
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 | # The new DamnedLies XML interface (around 2014-09-03) requires an
|
|---|
| 13 | # edition in the URL. We are fetchig the first on the list. The
|
|---|
| 14 | # assumtion is that it is the development relese a.k.a
|
|---|
| 15 | # new-stable. This approach is kind of a hack. A better approach is
|
|---|
| 16 | # desired.
|
|---|
| 17 | if [ ! "$ED" ] ;
|
|---|
| 18 | then
|
|---|
| 19 | rel=$(mktemp);
|
|---|
| 20 | wget --quiet -O $rel https://l10n.gnome.org/releases/xml
|
|---|
| 21 | ED=$(grep -ioE ".*\(development\)" -B1 $rel | grep -oE "gnome-[0-9\-]+");
|
|---|
| 22 | rm $rel
|
|---|
| 23 | fi
|
|---|
| 24 |
|
|---|
| 25 | if [ ! "$ED" ];
|
|---|
| 26 | then
|
|---|
| 27 | echo "Missing edition (i.e. gnome-3-14). Giving up!"
|
|---|
| 28 | exit 1
|
|---|
| 29 | fi
|
|---|
| 30 |
|
|---|
| 31 | wget http://l10n.gnome.org/languages/bg/$ED/xml -O $TMP
|
|---|
| 32 | echo "Версия на GNOME: $ED"
|
|---|
| 33 | java -cp $CP org.apache.xalan.xslt.Process -IN $TMP -XSL format.xsl
|
|---|
| 34 | rm $TMP
|
|---|
| 35 |
|
|---|
| 36 |
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.