diff options
author | Frederic Lepied <flepied@mandriva.com> | 2005-01-19 21:51:27 +0000 |
---|---|---|
committer | Frederic Lepied <flepied@mandriva.com> | 2005-01-19 21:51:27 +0000 |
commit | 14d24c1c0fb349594446c8d7c3c0761987423f08 (patch) | |
tree | acb6626b1b17fd64d1e28c083621c36308c17cec | |
parent | b5d4b4e0a1b3cdecdee27d56bd7c376ad72cf2af (diff) | |
download | indexhtml-14d24c1c0fb349594446c8d7c3c0761987423f08.tar indexhtml-14d24c1c0fb349594446c8d7c3c0761987423f08.tar.gz indexhtml-14d24c1c0fb349594446c8d7c3c0761987423f08.tar.bz2 indexhtml-14d24c1c0fb349594446c8d7c3c0761987423f08.tar.xz indexhtml-14d24c1c0fb349594446c8d7c3c0761987423f08.zip |
use a tar ball to be able to transport more than one file.
-rwxr-xr-x | update-indexhtml | 12 |
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 |