From 14d24c1c0fb349594446c8d7c3c0761987423f08 Mon Sep 17 00:00:00 2001 From: Frederic Lepied Date: Wed, 19 Jan 2005 21:51:27 +0000 Subject: use a tar ball to be able to transport more than one file. --- update-indexhtml | 12 ++++++++---- 1 file 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 -- cgit v1.2.1