wok-current rev 1685

get-flash-plugin: speedup & fix version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun Nov 09 23:08:30 2008 +0000 (2008-11-09)
parents c5d8d030881f
children 38785c491325
files get-flash-plugin/stuff/get-flash-plugin
line diff
     1.1 --- a/get-flash-plugin/stuff/get-flash-plugin	Sat Nov 08 17:55:54 2008 +0000
     1.2 +++ b/get-flash-plugin/stuff/get-flash-plugin	Sun Nov 09 23:08:30 2008 +0000
     1.3 @@ -15,10 +15,15 @@
     1.4  URL="http://fpdownload.macromedia.com/get/flashplayer/current/"
     1.5  
     1.6  # Download tarball
     1.7 -VERSIONS=""
     1.8 -for i in $(seq 20 -1 7); do
     1.9 -  wget -s ${URL}install_flash_player_${i}_linux.tar.gz 2> /dev/null || continue
    1.10 -  VERSIONS="$VERSIONS $i"
    1.11 +VERSIONS=""; i=9; while true; do
    1.12 +  if wget -s ${URL}install_flash_player_${i}_linux.tar.gz 2> /dev/null; then
    1.13 +    VERSIONS="$VERSIONS $i"
    1.14 +  elif [ -n "$VERSIONS" ]; then
    1.15 +    break
    1.16 +  elif [ $i -gt 20 ]; then
    1.17 +    exit 1
    1.18 +  fi
    1.19 +  i=$(($i + 1))
    1.20  done
    1.21  
    1.22  value="$(echo $VERSIONS)"
    1.23 @@ -42,12 +47,7 @@
    1.24  tar xzf $TARBALL
    1.25  
    1.26  cd $DIR
    1.27 -VERSION=""
    1.28 -for i in MAJ MIN REV ; do
    1.29 -  n=$(grep ^FPVERSION$i flashplayer-installer | cut -d= -f2)
    1.30 -  [ -n "$VERSION" ] && VERSION=$VERSION.
    1.31 -  VERSION=$VERSION$n
    1.32 -done
    1.33 +VERSION="$(strings libflashplayer.so | grep ^LNX | sed -e 's/LNX //' -e 's/,/./g')"
    1.34  
    1.35  # Install files
    1.36  chmod 755 libflashplayer.so