Need help with modified package installer script

Under development: PCMCIA, wireless, etc.
Post Reply
Message
Author
Todd
Posts: 311
Joined: Thu 31 Aug 2006, 18:25

Need help with modified package installer script

#1 Post by Todd »

I am trying to create a modified install script for iPup (http://www.ipup.info/).

This is how far I have gotten, but now I need some help:

Code: Select all

DLG1="
  while [ 1 ];do
   #MU suggested add the 'tail -n 1'...
   ALIENFILE="`Xdialog --title "$MSG9" --stdout --no-buttons --fselect "/root/*" 0 0 | tail -n 1`"
   if [ ! $? -eq 0 ];then
    exit
   fi
   if [ -f $ALIENFILE ];then
    break
   fi
  done
  sync
  cp -af $ALIENFILE /root/.packages/ #copy, leave original.
  sync
  cd /root/.packages
  APKGNAME="`basename $ALIENFILE`"
  #v2.13 test if enough space to expand tarball...
  #EXPFREEK=`df -k | grep ' /$' | tr -s ' ' | cut -f 4 -d ' '`
  EXPFREEB=`stat --filesystem --format=%f /` #no. free blocks.
  EXPFILEB=`stat --format=%b $APKGNAME` #no. blocks.
  EXPNEEDB=`expr $EXPFILEB \* 5` #bz2 can expand up to x3, need twice temp space.
  if [ $EXPNEEDB -gt $EXPFREEB ];then
   if [ ! "$DISABLEDX" = "yes" ];then
    gxmessage -center -name "pet" -bg "#ff8080" -title "PETget: ERROR" "The $APKGNAME package has been downloaded to /root/.packages,
however there is not enough room to uncompress and install it.
The free space is $EXPFREEB blocks but it is estimated you will
need $EXPNEEDB blocks temporarily for the expansion and install.
What I am trying to do is create a script for installing alien packages only with the intent that this script will replace the "petget" script (/usr/sbin/) in iPup.

Todd

Todd
Posts: 311
Joined: Thu 31 Aug 2006, 18:25

Never mind. . .

#2 Post by Todd »

Never mind, I did it. . .

Todd
Attachments
new_installer.tar.gz
(12.54 KiB) Downloaded 332 times

Post Reply