wok-next rev 18498

get-rar: better fix wget_url
author Xander Ziiryanoff <psychomaniak@xakep.ru>
date Sun Oct 11 16:02:31 2015 +0200 (2015-10-11)
parents 63bb4b41e580
children 9f85bdbb50bf
files get-rar/stuff/get-rar
line diff
     1.1 --- a/get-rar/stuff/get-rar	Sun Oct 11 13:59:02 2015 +0200
     1.2 +++ b/get-rar/stuff/get-rar	Sun Oct 11 16:02:31 2015 +0200
     1.3 @@ -17,7 +17,7 @@
     1.4    [ -d /var/lib/tazpkg/installed/$PACKAGE ] && exit 1
     1.5  fi
     1.6  
     1.7 -WGET_URL=$WEB_SITE$(wget -O - $WGET_URL | grep 'rarlinux-[0-9]' | sed 's/.*href="\(.*\)".*/\1/')
     1.8 +WGET_URL=$WEB_SITE$(wget -O - $WGET_URL | grep 'rarlinux-[0-9]' | sed 's/.*href="\(.*\)".*/\1/' | head -n1)
     1.9  TARBALL=$(basename $WGET_URL || true)
    1.10  VERSION=$(echo $TARBALL | sed 's/.*-\(.*\).tar.*/\1/')
    1.11  echo "Downloading $PACKAGE $VERSION from $WGET_URL..."
    1.12 @@ -28,7 +28,7 @@
    1.13  cd $DIR
    1.14  
    1.15  # Download tarball
    1.16 -wget $WGET_URL | cut -d' ' -f1
    1.17 +wget $WGET_URL
    1.18  if [ ! -f $TARBALL ]; then
    1.19  	cd $BASE
    1.20  	rm -rf $DIR