Subversion Repositories SvarDOS

Rev

Rev 109 | Rev 119 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
107 mv_fox 1
#!/bin/bash
2
 
3
SVNLSCHK='./svnlschk'
4
COREDIR='/srv/www/svarog386.viste.fr/repos/core'
5
HTMLFILE='/srv/www/svarog386.viste.fr/index-nls.htm'
109 mv_fox 6
INSTALLNLS='/root/svarog386/files/floppy/nls'
107 mv_fox 7
 
117 mv_fox 8
LANGSLIST="en      fr     pl     ru      tr"
9
LANGSLONG="default french polish russian turkish"
107 mv_fox 10
 
11
##############################################################################
12
 
13
processfile() {
14
  f=$1
15
  pkgname=$2
16
  nlstype=$3
17
 
18
  echo "Package: $pkgname"
19
 
20
  if [ $nlstype -eq 0 ] ; then
21
    LANGS=$LANGSLIST
22
    ENCOUNT=`$SVNLSCHK $f en $nlstype`
23
  else
24
    LANGS=$LANGSLONG
25
    ENCOUNT=`$SVNLSCHK $f default $nlstype`
26
  fi
27
 
28
  echo "<tr>" >> $HTMLFILE
29
  echo "  <td class=\"pkg\">$pkgname</td>" >> $HTMLFILE
30
 
31
  for l in $LANGS
32
  do
33
 
34
  if [ $ENCOUNT -lt 0 ] ; then
35
    echo "  <td class=\"err\">ERR</td>" >> $HTMLFILE
36
  fi
37
 
38
  if [ $ENCOUNT -eq 0 ] ; then
39
    echo "  <td class=\"unsup\"></td>" >> $HTMLFILE
40
  fi
41
 
42
  if [ $ENCOUNT -gt 0 ] ; then
43
    NLSCOUNT=`$SVNLSCHK $f $l $nlstype`
44
    if [ $ENCOUNT -eq $NLSCOUNT ] ; then
45
      echo "  <td class=\"complete\">$NLSCOUNT/$ENCOUNT</td>" >> $HTMLFILE
46
    else
47
      echo "  <td class=\"incomplete\">$NLSCOUNT/$ENCOUNT</td>" >> $HTMLFILE
48
    fi
49
  fi
50
 
51
  done
52
 
53
  echo "</tr>" >> $HTMLFILE
54
}
55
 
56
##############################################################################
57
 
58
cat head.html > $HTMLFILE
59
 
60
echo "<tr>" >> $HTMLFILE
61
printf "  <th></th>" >> $HTMLFILE
62
 
63
for l in $LANGSLIST
64
do
65
  printf "<th>%s</th>" "$l" >> $HTMLFILE
66
done
67
 
68
printf "\n</tr>\n" >> $HTMLFILE
69
 
109 mv_fox 70
# process INSTALL
71
mkdir /tmp/nls
72
cp $INSTALLNLS/install.* /tmp/nls/
73
CURDIR=`pwd`
74
cd /tmp
75
zip -qq -r install.zip nls
76
cd $CURDIR
77
processfile /tmp/install.zip "install" 0
78
rm /tmp/install.zip
79
rm -rf /tmp/nls
80
 
107 mv_fox 81
# process COMMAND (special NLS format)
82
processfile $COREDIR/command.zip "command (lng)" 1
83
processfile $COREDIR/command.zip "command (err)" 2
84
 
85
for f in $COREDIR/*.zip
86
do
87
 
88
  pkgname=`basename $f .zip`
89
  # skip COMMAND
90
  if [ $pkgname = "command" ] ; then
91
  continue;
92
  fi
93
 
94
  processfile $f $pkgname 0
95
 
96
done
97
 
98
cat tail.html >> $HTMLFILE
99
 
100
exit 0