get-scripts annotate FoxitReader @ rev 24

Add FoxitReader
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Nov 19 10:27:22 2014 +0100 (2014-11-19)
parents
children 48c3ef68bd4f
rev   line source
pascal@24 1 WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/"
pascal@24 2 WGET_URL=http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/
pascal@24 3 DEPENDS="gtk+"
pascal@24 4
pascal@24 5 while true; do
pascal@24 6 TARBALL=
pascal@24 7 for i in $(wget -O - $WGET_URL | sed \
pascal@24 8 "/href/!d;s/.*href=.\([^'\"]*\).*/\1/;/^[/?]/d"); do
pascal@24 9 case "$i" in
pascal@24 10 */) TARBALL=$i ;;
pascal@24 11 *deb) WGET_URL="$WGET_URL$i"
pascal@24 12 TARBALL=$i
pascal@24 13 break 2 ;;
pascal@24 14 esac
pascal@24 15 done
pascal@24 16 [ -z "$TARBALL" ] && echo "Package not found in $WGET_URL" exit 1
pascal@24 17 WGET_URL="$WGET_URL$TARBALL"
pascal@24 18 done
pascal@24 19
pascal@24 20 wget $WGET_URL
pascal@24 21 [ -f $TARBALL ] || abort_package "Could not download $TARBALL from $WGET_URL. Exiting."
pascal@24 22
pascal@24 23 mkdir $PACKAGE
pascal@24 24 dpkg-deb -e $TARBALL $PACKAGE/meta
pascal@24 25 dpkg-deb -x $TARBALL $PACKAGE/fs
pascal@24 26 # extracted pkg can be removed: Save RAM
pascal@24 27 rm -f $TARBALL
pascal@24 28 false && sed '/^Description:/,$!d;s/^Description://' \
pascal@24 29 < $PACKAGE/meta/control > $PACKAGE/description.txt
pascal@24 30
pascal@24 31 SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@24 32 #MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@24 33 VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)"
pascal@24 34 mv $PACKAGE $PACKAGE-$VERSION
pascal@24 35 set +e