wok rev 13705

get-OpenOffice3: fix download
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Dec 17 15:11:25 2012 +0100 (2012-12-17)
parents 0af812d8e116
children 05c57ff37237
files get-OpenOffice3/stuff/get-OpenOffice3
line diff
     1.1 --- a/get-OpenOffice3/stuff/get-OpenOffice3	Mon Dec 17 08:42:01 2012 -0500
     1.2 +++ b/get-OpenOffice3/stuff/get-OpenOffice3	Mon Dec 17 15:11:25 2012 +0100
     1.3 @@ -21,15 +21,18 @@
     1.4  http://www.ring.gr.jp/archives/misc/openoffice \
     1.5  http://ftp.nluug.nl/pub/office/openoffice \
     1.6  
     1.7 -do wget -O - $MIRROR/ 2> /dev/null | grep -q localized && break ; done
     1.8 +do
     1.9 +	wget -O - $MIRROR/ 2> /dev/null | grep -q localized || continue
    1.10 +	DIR="stable"
    1.11 +	LOC=$(wget -O - $MIRROR/localized/ 2> /dev/null | \
    1.12 +		grep -E ">$LANG/|>${LANG/_/-}/|>${LANG%_*}/" | \
    1.13 +		head -1 | sed 's/.*href=\"\(.*\)\/\".*/\1/')
    1.14 +	[ -n "$LOC" ] && DIR="localized/$LOC"
    1.15 +	VERSION="$(basename $(wget -O - $MIRROR/$DIR/ 2> /dev/null | \
    1.16 +		grep href=\"[0-9] | tail -1 | sed 's/.*href=\"\(.*\)\".*/\1/'))"
    1.17 +	[ -n "$VERSION" ] && break
    1.18 +done
    1.19  
    1.20 -DIR="stable"
    1.21 -LOC=$(wget -O - $MIRROR/localized/ 2> /dev/null \
    1.22 -| grep -E ">$LANG/|>${LANG/_/-}/|>${LANG%_*}/" | head -1 | sed 's/.*href=\"\(.*\)\/\".*/\1/')
    1.23 -[ -n "$LOC" ] && DIR="localized/$LOC"
    1.24 -
    1.25 -VERSION="$(basename $(wget -O - $MIRROR/$DIR/ \
    1.26 -	2> /dev/null | grep href=\"[0-9] | tail -1 | sed 's/.*href=\"\(.*\)\".*/\1/'))"
    1.27  if [ -z "$VERSION" ]; then
    1.28  	echo "Can't find VERSION. Abort."
    1.29  	exit 0
    1.30 @@ -41,6 +44,7 @@
    1.31  WGET_URL=$MIRROR/$DIR/$VERSION/$TARBALL
    1.32  
    1.33  TEMP_DIR="/tmp/$PACKAGE.$$"
    1.34 +CUR_DIR=$(pwd)
    1.35  SOURCE_DIR="/tmp/src.$$"
    1.36  EXCLUDE="kde|gnome|test"
    1.37  LOG="/tmp/$(basename $0 .sh).log"
    1.38 @@ -159,7 +163,7 @@
    1.39  VERSION="$VERSION"
    1.40  CATEGORY="office"
    1.41  SHORT_DESC="Productivity suite."
    1.42 -DEPENDS=""
    1.43 +DEPENDS="java-jre"
    1.44  WEB_SITE="$URL"
    1.45  
    1.46  post_install()
    1.47 @@ -192,7 +196,11 @@
    1.48  
    1.49  # Install pseudo package
    1.50  tazpkg install $PACKAGE-$VERSION.tazpkg --root=$ROOT
    1.51 +case " $@ " in
    1.52 +*\ --k*) mv $PACKAGE-$VERSION.tazpkg $CUR_DIR ;;
    1.53 +esac
    1.54  
    1.55  # Clean
    1.56 -rm -rf $TEMP_DIR
    1.57 +cd $CUR_DIR
    1.58 +rm -rf $TMP_DIR
    1.59