Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 27 Nov 2014, 00:23
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Script to make a SeaMonkey sfs
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count_1  
Author Message
Uten

Joined: 29 Jan 2008
Posts: 52

PostPosted: Wed 23 Jan 2013, 16:43    Post_subject:  Script to make a SeaMonkey sfs  

Think the script explains itself. I tested it with precise
Code:
#!/bin/bash
###################################################################
#   Script to download and make a puppylinux style seamonkey.sfs
#
#   NOTICE: In puppylinux the squashfs hiaracy as seen from the
#           systems perspective is Savefile, pup_xxx.sfs(the system
#           pup), then loaded sfs files in their load order(?)
#
#           Because of this we can not replace the original soft links
#           in pup_xxx's /usr/[bin|lib] with our own in the sfs file.
#
#           I can think of two solutions at the moment.
#           1) To place the links in a path with precidence to /usr/bin
#              in $PATH
#           2) Make a fix script to do the changes the next time you
#              boot the computer. The fix script may be placed in
#              /root/startup
#
#           This script use solution nr 1.
#             
#
#   CONFIGURE: Search for TODO: and select accordingly.
#   NOTICE:    This script does not create menu/desktop links.
#             
####################################################################

# Save params
PARAMS=$*
WORK_FOLDER=$(pwd)
#
# TODO: Replace the version numbers so you get the one you want.
#       Script tested with SEAMONKEY_VERSION="2.15"
SEMONKEY_VERSION="2.15.1"
#
# TODO: LANG_ID could be en-GB, en-US, uk, it, and so one find yours
#       on the mozilla site. Tested with nb-NO and en-GB
LANG_ID="en-GB"
#
# TODO: Modify the url?
DOWNLOAD_URL=http://download.cdn.mozilla.net/pub/mozilla.org/seamonkey/releases/$SEMONKEY_VERSION/linux-i686/$LANG_ID/seamonkey-$SEMONKEY_VERSION.tar.bz2

if [ "$1" == '--help'  -o  "$1" == '' ]; then
   echo ""
   echo "seamonkey-sfs.sh [--clean|--pristine|--help]"
   echo
   echo "Without options nothing is removed and only simple checks are done before sfs file is made"
   echo ""
   echo "--clean removes seamonkey-$SEMONKEY_VERSION.sfs and"
   echo "directory seamonkey-$SEMONKEY_VERSION"
   echo ""
   echo "--pristine: removes as clean and the file seamonkey-$SEMONKEY_VERSION.tar.bz2"
   echo ""
   echo "--help prints this information"
   echo ""
   exit 0
fi

if [ "$1" == '--clean' ]; then
   #rm seamonkey-$SEMONKEY_VERSION.tar.bz2
   rm seamonkey-$SEMONKEY_VERSION.sfs
   rm -rf seamonkey-$SEMONKEY_VERSION
fi
if [ "$1" == '--pristine' ]; then
   rm seamonkey-$SEMONKEY_VERSION.tar.bz2
   rm seamonkey-$SEMONKEY_VERSION.sfs
   rm -rf seamonkey-$SEMONKEY_VERSION
fi
#
# Download seamonkey from mozilla
wget -nc $DOWNLOAD_URL
# TODO_CODE: Check for errors.
if [ -e seamonkey-$SEMONKEY_VERSION.tar.bz2 ]; then
   #File is present so unpack it to the opt folder
   if [ ! -e ./seamonkey-$SEMONKEY_VERSION/opt ]; then
      mkdir -p seamonkey-$SEMONKEY_VERSION/opt
   fi
   if [ ! -e seamonkey-$SEMONKEY_VERSION/opt/seamonkey ]; then
      echo unpacking seamonkey-$SEMONKEY_VERSION.tar.bz2
      #NOTICE: -axf must be followed by the file
      tar --checkpoint=500 --directory=./seamonkey-$SEMONKEY_VERSION/opt/ -axf  ./seamonkey-$SEMONKEY_VERSION.tar.bz2
   fi
   # TODO_CODE: Check for errors.
   # Create folders and links to run seamonkey
   mkdir -p ./seamonkey-$SEMONKEY_VERSION/bin/
   mkdir -p ./seamonkey-$SEMONKEY_VERSION/usr/bin
   mkdir -p ./seamonkey-$SEMONKEY_VERSION/usr/lib
   cd seamonkey-$SEMONKEY_VERSION/
   ln -f -s -t ./usr/lib/ /opt/seamonkey
   # TODO: a link in ./usr/bin wil not replace the original link.
   # The official pup_xxx.sfs has precedence and is only replaced
   # by stuff in the personal save file
   # RESOURCE: http://puppylinux.com/development/howpuppyworks.html
   #ln -s -f -t ./usr/bin/ /opt/seamonkey/seamonkey
   # SOULUTION: (Sort of) place the links in an earlyer $PATH path.
   ln -s -f -t ./bin/ /opt/seamonkey/seamonkey
   cd ./bin
   ln -s -f seamonkey mozilla
   # TODO_CODE: Check for errors
   #
   # TODO_CODE: Add plugins, libflash and so on.
   
   #
   # Create the sfs file   
   cd $WORK_FOLDER
   mksquashfs  $WORK_FOLDER/seamonkey-$SEMONKEY_VERSION/ seamonkey-$SEMONKEY_VERSION.sfs -noappend
   #
fi
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count_1  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0519s ][ Queries: 12 (0.0035s) ][ GZIP on ]