get-scripts rev 24
Add FoxitReader
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 19 10:27:22 2014 +0100 (2014-11-19) |
parents | db08c0205587 |
children | a91a3ad69b69 |
files | FoxitReader |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/FoxitReader Wed Nov 19 10:27:22 2014 +0100 1.3 @@ -0,0 +1,35 @@ 1.4 +WEB_SITE="http://www.foxitsoftware.com/pdf/desklinux/" 1.5 +WGET_URL=http://cdn01.foxitsoftware.com/pub/foxit/reader/desktop/linux/ 1.6 +DEPENDS="gtk+" 1.7 + 1.8 +while true; do 1.9 + TARBALL= 1.10 + for i in $(wget -O - $WGET_URL | sed \ 1.11 + "/href/!d;s/.*href=.\([^'\"]*\).*/\1/;/^[/?]/d"); do 1.12 + case "$i" in 1.13 + */) TARBALL=$i ;; 1.14 + *deb) WGET_URL="$WGET_URL$i" 1.15 + TARBALL=$i 1.16 + break 2 ;; 1.17 + esac 1.18 + done 1.19 + [ -z "$TARBALL" ] && echo "Package not found in $WGET_URL" exit 1 1.20 + WGET_URL="$WGET_URL$TARBALL" 1.21 +done 1.22 + 1.23 +wget $WGET_URL 1.24 +[ -f $TARBALL ] || abort_package "Could not download $TARBALL from $WGET_URL. Exiting." 1.25 + 1.26 +mkdir $PACKAGE 1.27 +dpkg-deb -e $TARBALL $PACKAGE/meta 1.28 +dpkg-deb -x $TARBALL $PACKAGE/fs 1.29 +# extracted pkg can be removed: Save RAM 1.30 +rm -f $TARBALL 1.31 +false && sed '/^Description:/,$!d;s/^Description://' \ 1.32 + < $PACKAGE/meta/control > $PACKAGE/description.txt 1.33 + 1.34 +SHORT_DESC="$(sed '/^Description:/!d;s/.*: //' $PACKAGE/meta/control)" 1.35 +#MAINTAINER="$(sed '/^Maintainer:/!d;s/.*: //' $PACKAGE/meta/control)" 1.36 +VERSION="$(sed '/^Version:/!d;s/.*: //' $PACKAGE/meta/control)" 1.37 +mv $PACKAGE $PACKAGE-$VERSION 1.38 +set +e