summaryrefslogtreecommitdiffstats
path: root/update-indexhtml
diff options
context:
space:
mode:
Diffstat (limited to 'update-indexhtml')
-rwxr-xr-xupdate-indexhtml12
1 files changed, 8 insertions, 4 deletions
diff --git a/update-indexhtml b/update-indexhtml
index cce08a4..a42e72f 100755
--- a/update-indexhtml
+++ b/update-indexhtml
@@ -17,6 +17,11 @@ docdir=$datadir/doc/HTML
[ -d $idxdir ] || exit 1
[ -d $docdir ] || exit 1
+function get() {
+ wget -q -N -O $docdir/index.tmp $1 && \
+ tar jxf $docdir/index.tmp -C $docdir && exit 0
+}
+
if [ -r /etc/sysconfig/i18n ] ; then
. /etc/sysconfig/i18n
if [ -n "$LANGUAGE" ]; then
@@ -33,13 +38,12 @@ if [ "$1" != nonetwork ] && /sbin/ip route | grep -q default; then
if [ -r /etc/profile.d/proxy.sh ]; then
. /etc/profile.d/proxy.sh
fi
- cp -pf $docdir/index.html $docdir/index.tmp
for i in $LISTLANG en; do
- wget -q -N -O $docdir/index.tmp $URL/index-$i.html && mv -f $docdir/index.tmp $docdir/index.html && exit 0
+ get $URL/index-$i.tar.bz2
+
lang=`echo $i | cut -b-2`
- wget -q -N -O $docdir/index.tmp $URL/index-$lang.html && mv -f $docdir/index.tmp $docdir/index.html && exit 0
+ get $URL/index-$lang.tar.bz2
done
- rm -f $docdir/index.tmp
fi
for i in $LISTLANG en; do