wok-current rev 20036

get-palemoon: get current version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 24 11:36:35 2017 +0200 (2017-08-24)
parents 4475b80d02a6
children 16a08ab1ff03
files get-palemoon/stuff/get-palemoon
line diff
     1.1 --- a/get-palemoon/stuff/get-palemoon	Thu Aug 24 02:43:00 2017 +0200
     1.2 +++ b/get-palemoon/stuff/get-palemoon	Thu Aug 24 11:36:35 2017 +0200
     1.3 @@ -1,9 +1,11 @@
     1.4  #!/bin/sh
     1.5  # get Pale Moon web browser
     1.6 -VERSION="27.4.2"
     1.7  
     1.8 -WGET_URL="http://linux.palemoon.org/datastore/release/\
     1.9 -palemoon-$VERSION.en-US.linux-i686.tar.bz2"
    1.10 +WGET_URL="http://linux.palemoon.org$(wget -O - \
    1.11 +http://linux.palemoon.org/download/mainline/ 2> /dev/null | \
    1.12 +sed '/686/!d;s/.*href="\([^"]*\).*/\1/;q')"
    1.13 +VERSION="$(echo $WGET_URL | sed 's/.*palemoon-\(.*\).en-US.*/\1/')"
    1.14 +
    1.15  mkdir -p $1/opt; cd $1/opt; busybox wget -O - $WGET_URL | tar -xjf -
    1.16  
    1.17  ################
    1.18 @@ -11,7 +13,7 @@
    1.19  cat > $1/$DESKTOP << EOA
    1.20  [Desktop Entry]
    1.21  Type=Application
    1.22 -Name=Palemoon v27.4
    1.23 +Name=Palemoon v${VERSION%.*}
    1.24  Exec=/opt/palemoon/palemoon %u
    1.25  Icon=/opt/palemoon/browser/icons/mozicon128.png
    1.26  StartupNotify=true
    1.27 @@ -24,8 +26,7 @@
    1.28  cat > "$PKGDIR/receipt" << EOR
    1.29  # SliTaz package receipt.
    1.30  
    1.31 -PACKED_SIZE="28.8MB"
    1.32 -UNPACKED_SIZE="60.9MB"
    1.33 +UNPACKED_SIZE="$(du -hs $1/opt/palemoon | awk '{ print $1 }')"
    1.34  PACKAGE="palemoon-opt"
    1.35  VERSION="$VERSION"
    1.36  CATEGORY="network"