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 Fri 29 Aug 2014, 08:22
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How to make a single sfs file from multiple pets
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
Tman


Joined: 22 Jan 2011
Posts: 814
Location: Toronto

PostPosted: Sun 22 Jan 2012, 16:10    Post subject:  How to make a single sfs file from multiple pets
Subject description: easy-peasy
 

1) First, you will need to install 01micko's pet2sfs script.

2) Create a sfs folder inside any linux partition or...
if you are running a frugal install , you can also create the folder the linux filesystem. eg. the /root or /tmp folder.
- I must elaborate on this cause it's important. For example, I am running Puppy (frugal install) on sda1 which is a ntfs filesystem. If I create, a folder named /mnt/sda1/sfs, the permissions will get messed up because I created the sfs folder in the ntfs partition; it doesn't handle permissions the same way a linux partition does.
- to do this properly on a frugal install, what I usually do is create a /tmp/sfs folder.

3) copy all of the pets which you want to combine into the sfs folder you've created.

4) open up the terminal and change to the sfs folder you've created. For my example, I will use the /tmp/sfs folder. Enter the following code
Code:

cd /tmp/sfs
pet2sfs PackageName-1.0

Of course, "PackageName" can be any name that you choose.

5) After the sfs has been created, move it to the folder of your choice. You should then remove everything else in the /tmp/sfs folder.

6) The final step is to test your sfs to make sure it works.

The script can also convert a single pet into an sfs, but you have to name it different from the pet-name.
Done! Now that wasn't too difficult, right? Wink Enjoy.
Back to top
View user's profile Send private message 
sc0ttman


Joined: 16 Sep 2009
Posts: 2376
Location: UK

PostPosted: Sun 22 Jan 2012, 16:59    Post subject:  

Also, there is this, which can create an SFS or PET of combined PET files:

"This script combines your .PETs into a single .PET or .SFS file.
You will be asked to create a .PET file first, then a .SFS file
if no .PET was created. This script takes one argument - the
directory containing the .PETs that you want to combine into
a single package."

Code:
#!/bin/sh

if [ ! $1 ];then
   echo "No dir given. Usage: `basename $0` [directory]
   
Example: `basename $0` $HOME/myfiles

Info:

This script combines your .PETs into a single .PET or .SFS file.
You will be asked to create a .PET file first, then a .SFS file
if no .PET was created. This script takes one argument - the
directory containing the .PETs that you want to combine into
a single package.

"
   exit
fi

mkdir $1/pets
mkdir $1/files
for i in "$1/"* ; do # for each file in the given package dir
   # get filenames, and extensions, without paths
   export fullname=`basename "$i"`    # filename and extension
   export filename=${fullname%.*}    # filename, no extension
   export extension=${fullname##*.} # extension only
   tar -xzvf "$i" -C "$1/pets"
   # copy extracted contents (only the stuff inside the extracted folders) from $workdir into $basedir
   cp --preserve=all -f -v -r "$1/pets/$filename/"* "$1/files"
   # remove pet.spec files in $basedir
   rm -v "$1/files/"*"pet.specs"
done
rm -r -v $1/pets
rmdir $1/pets

REPLY="none"
# ask to create pet
[ -e `which dir2pet` ] && Xdialog --title "Pet Create" --yesno "Do you want to create new pet file of the pets you have extracted?" 0 0 && REPLY=$?
if [ "$REPLY" = 0 ];then
   petname=$(Xdialog --title "Name your pet" --stdout --inputbox "Choose a filename for your pet file" 0 0 "name-version.pet")
   mv $1/files $1/${petname%.*} # rename dir to $petname, without extension
   rxvt -e dir2pet $1/${petname%.*}
else
   # ask to make sfs file
   [ -e `which dir2pet` ] && Xdialog --title "SFS Create" --yesno "Do you want to create an sfs file of the pets you have extracted?" 0 0 && REPLY=$?
   [ "$REPLY" = 0 ] && rxvt -e dir2sfs $1/files
fi


Save the code in a shell script or blank file and make executable
that is, in the terminal:

chmod +x /path/to/the/file

Usage:

easypackage /path/to/dir/containing/petfiles/

_________________
Akita Linux, VLC-GTK, Pup Search, Pup File Search
Back to top
View user's profile Send private message 
technosaurus


Joined: 18 May 2008
Posts: 4346

PostPosted: Sun 22 Jan 2012, 19:54    Post subject:  

Can someone post this on a puppy site so that we don't keep repeating:
http://www.murga-linux.com/puppy/viewtopic.php?t=53241
It contains all info for ISO, sfs and pets using GUI tools only

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send private message 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Mon 23 Jan 2012, 10:05    Post subject:  

Quote:
Can someone post this on a puppy site so that we don't keep repeating:


techno
I've put a request to darkcity for a wiki page Very Happy

Aitch Smile
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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