sb combiner

Programming issues and discussion
Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

sb combiner

Postby Scooby » 22 Sep 2013, 19:32

Now with great script makesfs by Simargl I suddenly found myself with a lot of sfs-files

I wanted too combine several sfs files into one.

Download and try. I put mine in /usr/bin

New version with split implemented!!
savefile can be merged into a squashfile!

check out posts below for more info!
or run sbcomb --help


Install
built package by download from HERE
install with pacman -U sbcomb-0.6-1-i686.pkg.tar.xz (Uninstall with pacman -R sbcomb-0.6-1-i686.pkg.tar.xz)

Or
can now be downloaded as a PKGBUILD
to be build and installed with makepkg -si --asroot in the same dir as downloaded PKGBUILD

Or
add a custom repo to /etc/pacman.conf
insert before [alphaos]
[scoobyalphaos]
Server = https://bitbucket.org/Scoby/sbcomb/downloads

1. hit pacman -Sy to update db.
2. pacman -Ss sbcomb to search for package
3. Install with pacman -S sbcomb

Or download here for manual install
sbcomb.0.6.tar.gz
Updated yet again!
(3.83 KiB) Downloaded 697 times


Code: Select all

 Usage:
      sbcomb [OPTION]... [FILES]...
          -h, --help           display usage message.
         
          -v, --version        display script version.
         
          -n, --noclobber      check if destination filename already exists.
         
          -d, --nosplitinfo    turns off default behaviour. will not add file
                               to root for each infile listing all dirs and
                               files. With this flag you cannot split the
                               resulting squashfile to its parts again.
                                           
          -s, --split          takes a squashfile as argument that was
                               previously merged and splits it up into the
                               parts again. works even if a savefile have
                               been merged into squashfile. if a second
                               argument is supplied only this object will
                               be ectracted from the squashfile. The begin-
                               ning of name will suffice
               
          -l, --list-splitinfo takes a squashfile as argument and lists
                               splitinfo contained
                             
          -m, --mksquash       takes a dir as argument and creates a squashfile
                               from its content. Can also be achieved without
                               flag by command "sbcomb dir/"
                            
          -e, --ext            set extension used, takes an extension as
                               argument. if not supplied extension
                               will default to .sb      

          -f, --savefile       will let you specify a savefile to be
                               be merged into new squash file.
                 
     merges several files containing squashfilesystem into one.
     will not remmove source files. The destination filname will
     be an aggregation of the sourcefilenames.

     Examples:
               sbcomb squashroot/
               sbcomb grub.sb smplayer.sb
               sbcomb --ext sfs grub.sfs smplayer.sfs
               sbcomb --savefile changes.fs4
               sbcomb --savefile changes.fs4 zdrv.sb
               sbcomb --list-splitinfo changes_zdrv.sb
               sbcomb --split changes_zdrv.sb
               sbcomb --split changes_zdrv.sb changes.fs4
               sbcomb --split changes_zdrv.sb chang

 


.
.

john3voltas
Expert
Posts: 266
Joined: 19 May 2013, 21:53

Re: sfs combiner

Postby john3voltas » 05 Oct 2013, 10:57

Good stuff Scooby ;)

smil99
Proficient
Posts: 73
Joined: 14 Sep 2013, 13:37

Re: sfs combiner

Postby smil99 » 17 Oct 2013, 22:51

Tried sfscomb and it works nicely. Now I can have an uncluttered /mnt/home directory.
Thanks scooby :)
Cheers.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sfs combiner

Postby Scooby » 23 Nov 2013, 00:51

Name is changed and updated script to work with *.sb files by default as requested by smil99 here

still works with sfs if you use sbcomb --ext sfs file1.sfs file2.sfs

sbcomb.tar.gz
changed name and script now works
with *.sb files by default.
(1.33 KiB) Downloaded 564 times

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 23 Nov 2013, 14:36

Updated sbcomb

Can now merge savefile into .sb.
Probably should be used with care. A lot of stuff
gets included in savefile.

Code: Select all

alphaos#> ./sbcomb --help
    Usage:
      sbcomb [OPTION]... [FILES]...
          -h, --help           display usage message.
          -v, --version       display script version.
          -n, --noclobber   check if destination filename already exists.

          -e, --ext            set extension used, takes an extension as
                                 argument. if not supplied extension
                                 will default to .sb.      

          -s, --savefile     will let you specify a savefile to be
                                 be merged into new squash file.
                 
     Merges several files containing squashfilesystem into one.
     Will not remmove source files. The destination filname will
     be an aggregation of the sourcefilenames.

     Examples:
               sbcomb grub.sb smplayer.sb
               sbcomb --ext sfs grub.sfs smplayer.sfs
               sbcomb --savefile changes.fs4 zdrv.sb



sbcomb.0.3.tar.gz
Updated
(1.98 KiB) Downloaded 505 times

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 24 Nov 2013, 15:38

Code: Select all

[15:31 root@alphaos tmp > ./sbcomb --help
    Usage:
      sbcomb [OPTION]... [FILES]...
          -h, --help         display usage message.
         
          -v, --version      display script version.
         
          -n, --noclobber    check if destination filename already exists.
         
          -d, --nodirinfo    turns off default behaviour. will not add file
                             to root for each infile listing all dirs and
                             files. With this flag you cannot split the
                             resulting squashfile to its parts again.
                                           
          -u, --split        takes a squashfile as argument that was
                             previously merged and splits it up into the
                             parts again. works even if savefile have been
                             merged into squashfile
                             
          -c, --mksquash     takes a dir as argument and creates a squashfile
                             from its content. Can also be achieved without
                             flag by command "sbcomb dir/"
                            
          -e, --ext          set extension used, takes an extension as
                             argument. if not supplied extension
                             will default to .sb      

          -s, --savefile  will let you specify a savefile to be
                              be merged into new squash file.
                 
     merges several files containing squashfilesystem into one.
     will not remmove source files. The destination filname will
     be an aggregation of the sourcefilenames.

     Examples:
               sbcomb squashroot/
               sbcomb grub.sb smplayer.sb
               sbcomb --ext sfs grub.sfs smplayer.sfs
               sbcomb --nodirinfo grub.sb smplayer.sb
               sbcomb --savefile changes.fs4 zdrv.sb
               sbcomb --split changes_zdrv.sb


Added --split so you can unmerge a squashfs file again.
Have to be created with sbcomb to start with though.

split works with savefile as well!

Since it was already there added option to squashing a dir

DId a merge on a savefile in use and it went well :-) so removed check if savefile was mounted!

simargl
Site Admin
Posts: 466
Joined: 16 May 2013, 10:54
Contact:

Re: sb combiner

Postby simargl » 24 Nov 2013, 17:56

Useful script especially for that option of converting savefile to sb bundle. Question is should I add this to rootfs on bitbucket so it can be in next versions or you plan for some more functions.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 24 Nov 2013, 18:51

simargl wrote:you plan for some more functions.


I'm fiddling with bash completion now.
I thought to create a local arch package of it
( as much to learn how to do that ) so it could be
pacmanned.

You are of course welcome to add it to rootfs repo
I can fiddle with arch package anyway.

I'm not sure of more functions, any suggestions?

*EDIT*
I have somtheings t
o fix

BTW I am thinking of installing some versioning system locally on my computer
I used cvs years passed but maybe there are better ones now?

Can you recommend any?

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 25 Nov 2013, 23:54

New version 0.5 see first post.

fixed:

1. Handle nestled merge and splits.
2. Fixed handling of splitinfo if file with same name added multiple times
3. implemented --list-splitinfo
4. Extended split functionality so you can split out named object
.

Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

Re: sb combiner

Postby Scooby » 27 Nov 2013, 15:31

new version 0.6, see first post.

Nothing big but some changes under the hood to make it more robust.
Fixed a few errors.


Return to “Scripting and Programming”

Who is online

Users browsing this forum: No registered users and 10 guests

cron