Combine a number of SFS files into one SFS file

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

Combine a number of SFS files into one SFS file

#1 Post by smokey01 »

Below is a simple script which will allow you to combine a number of your favourite SFS into one larger SFS file.

All you do is drop all of your SFS files you wish to combine on top of the script. Place it on the desktop if you wish.

All SFS will be unsquashed to /mnt/home/work then all squashed up again in the same directory. When finished it will display a rox window with a file called new.sfs. You need to rename and move your new file because it will be deleted when you click on the OK dialog.

Most puppies, if not all, have the following required dependencies:
unsquashfs
squashfs
Xdialog
bash

Code: Select all

#!/bin/sh
#Written by smokey01
# This is a simple script to unsquash a bunch of sfs files.
# Place this script on your desktop then drop all of your sfs files onto it
# to make one big sfs file.
mkdir -p /mnt/home/work
for i in "$@"; do
 case "${i}" in
	*.sfs|*.SFS)
urxvt -e /usr/sbin/unsquashfs -f -d /mnt/home/work/root-sfs "${i}" 
	;;
 esac
 done
 if [ "${1}" = "" ]; then
Xdialog --title squasher --infobox "You need to drop SFS files on the icon, \nnot click on it.\n\n
You require a lot of disk space this is why the\n working directory is at /mnt/home/work" 0 0 10000
 else
urxvt -e /usr/sbin/mksquashfs /mnt/home/work/root-sfs /mnt/home/work/new.sfs
rox /mnt/home/work
Xdialog --title "***** WARNING *****" --msgbox "Rename and move the new.sfs file.\n When you click on OK it will be deleted" 0 0
rm -rf /mnt/home/work
fi

tlchost
Posts: 2057
Joined: Sun 05 Aug 2007, 23:26
Location: Baltimore, Maryland USA
Contact:

#2 Post by tlchost »

I copied the script to the desktop in slacko5.5....no joy, can not drop sfs files onto it. Any ideas on how to fix it?

thanks

Thom

User avatar
bignono1
Posts: 360
Joined: Sun 17 May 2009, 07:30
Location: Q8

#3 Post by bignono1 »

Copy the script to the startup folder.

User avatar
smokey01
Posts: 2813
Joined: Sat 30 Dec 2006, 23:15
Location: South Australia :-(
Contact:

#4 Post by smokey01 »

Tom what window manager are you using? Openbox or JWM?

You also need to have a /mnt/home drive so operating live probably won't work. I hard coded /mnt/home because you do need quite a lot of disk space when manipulating sfs files. Using the savefile is not recommended.
Last edited by smokey01 on Tue 09 Apr 2013, 21:14, edited 1 time in total.

User avatar
Karl Godt
Posts: 4199
Joined: Sun 20 Jun 2010, 13:52
Location: Kiel,Germany

#5 Post by Karl Godt »

make script executable and watchout for the right unsquashfs -v

Code: Select all

unsquashfs              unsquashfs-4.2-lzma     unsquashfs-4.2-xz
unsquashfs3             unsquashfs-4.2-lzma_xz  
unsquashfs4             unsquashfs-4.2-lzma+xz  
«Give me GUI or Death» -- I give you [[Xx]term[inal]] [[Cc]on[s][ole]] .
Macpup user since 2010 on full installations.
People who want problems with Puppy boot frugal :P

Post Reply