WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: foxit_installscript  (Read 5274 times)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
foxit_installscript
« on: June 18, 2009, 12:45:24 AM »
This will install foxit reader:



Make sure you have 24 depth resolution or foxit will not work.

Code: [Select]
#!/bin/sh

if [ "$USER" == "root" ]; then
echo "Do not need to run as root.  Exiting.."
exit 1
fi

if [ ! -f /usr/local/tce.installed/squashfs-tools-4.x ]; then
tce-load -iw squashfs-tools-4.x
exit
fi

if [ ! -f /usr/local/tce.installed/gtk2 ]; then
tce-load -iw gtk2
exit 1
fi


NAME=foxit-reader
VERSION=1.1
DOWNLOAD=http://cdn04.foxitsoftware.com/pub/foxit/reader/desktop/linux/1.x/1.1/enu/
DOWNLOAD2=http://repo.tinycorelinux.net/4.x/x86/tcz/src/foxit/
SOURCE=FoxitReader-1.1.0.tar.bz2
SOURCE2=foxit-base.tar.gz
MD5SUM=585d2fd105a221c78e89607039f17126
MD5SUM2=221ff45b68ac56dbf29ab2454de30ada
SRCDIR=/tmp
TCEDIR="`readlink /etc/sysconfig/tcedir`/optional"
TMPDIR=/tmp/foxit578902374752
PKG="$TMPDIR"/pkg

cd "$SRCDIR"
if [ -e "$SOURCE" ]; then
  if [ $(md5sum "$SOURCE" | cut -c1-32) != "$MD5SUM" ]; then
    sudo rm -r "$SOURCE"
  fi
fi
if [ ! -e "$SOURCE" ]; then
  wget -c "$DOWNLOAD"/"$SOURCE"
fi
if [ $(md5sum "$SOURCE" | cut -c1-32) = "$MD5SUM" ]; then
  echo "md5sum passed."
else
  echo "Download failed. aborting"
  exit 1;
fi

if [ -e "$SOURCE2" ]; then
  if [ $(md5sum "$SOURCE2" | cut -c1-32) != "$MD5SUM2" ]; then
    sudo rm -r "$SOURCE2"
  fi
fi
if [ ! -e "$SOURCE2" ]; then
  wget -c "$DOWNLOAD2"/"$SOURCE2"
fi
if [ $(md5sum "$SOURCE2" | cut -c1-32) = "$MD5SUM2" ]; then
  echo "md5sum passed."
else
  echo "Download failed. aborting"
  exit 1;
fi


[ -d "$PKG" ] || mkdir -p "$PKG"/usr/local/bin


tar xzvf foxit-base.tar.gz -C "$PKG"
cd "$TMPDIR"
tar xjvf ../FoxitReader-1.1.0.tar.bz2 1.1-release/FoxitReader

mv 1.1-release/FoxitReader "$PKG"/usr/local/bin/foxitreader
cd "$TMPDIR"
mksquashfs pkg "$TCEDIR"/"$NAME".tcz -noappend
sudo rm -r "$TMPDIR"
echo "gtk2.tcz" > "$TCEDIR"/"$NAME".tcz.dep
echo " "$NAME".tcz is now in $TCEDIR"

« Last Edit: February 26, 2013, 06:52:31 PM by Jason W »

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: foxit_installscript
« Reply #1 on: September 29, 2009, 09:04:50 AM »
Updated to 1.1

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: foxit_installscript
« Reply #2 on: February 26, 2013, 06:52:53 PM »
Updated to work with TC 4.x

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: foxit_installscript
« Reply #3 on: March 02, 2013, 03:21:43 AM »
libcups.tcz appears to be a dependency

Code: [Select]
--- foxit-installscript Sat Mar  2 10:11:34 2013
+++ foxit-installscript2        Sat Mar  2 10:06:49 2013
@@ -15,10 +15,6 @@
        exit 1
 fi
 
-if [ ! -f /usr/local/tce.installed/libcups ]; then
-       tce-load -iw libcups.tcz
-       exit 1
-fi
 
 NAME=foxit-reader
 VERSION=1.1
@@ -77,5 +73,4 @@
 mksquashfs pkg "$TCEDIR"/"$NAME".tcz -noappend
 sudo rm -r "$TMPDIR"
 echo "gtk2.tcz" > "$TCEDIR"/"$NAME".tcz.dep
-echo "libcups.tcz" >> "$TCEDIR"/"$NAME".tcz.dep
 echo " "$NAME".tcz is now in $TCEDIR
« Last Edit: March 02, 2013, 03:59:48 AM by tinypoodle »
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Jason W

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 9730
Re: foxit_installscript
« Reply #4 on: March 02, 2013, 07:52:23 AM »
Thanks, I will add it in.