Sync-wbfs script

Discussion in 'Wii - Backup Loaders' started by DynomiteGopher, Jun 17, 2010.

Jun 17, 2010

Sync-wbfs script by DynomiteGopher at 12:23 AM (2,139 Views / 0 Likes) 10 replies

  1. DynomiteGopher
    OP

    Newcomer DynomiteGopher Newbie

    Joined:
    Jun 16, 2010
    Messages:
    5
    Country:
    Canada
    Sync-WBFS v0.03.1, 10-07-01

    Add files, archives and directories to a WBFS partition

    Add Wii disc images to a wbfs formatted partition. Input can ge given as either a directory to be scanned for all supported files or as files.
    Supported files are .ciso, .iso, .wbi and .wdf images and can be automatically extracted from 7zip, bzip2, gzip, rar, tar and zip and archives.

    Dependencies

    It uses Wiimm's awesome command line tool which you'll need.
    WIT: Wiimms ISO Tools Thread

    You'll also need p7zip, unrar-nonfree, and unzip if you don't have them already.

    Quick guide on how to use this script

    Change log v0.03.1, 10-07-01


    Code:
    .wbi support added
    
    7zip archives with passwords skipped
    Script would instead hang awaiting a password now they will be skipped
    Change log v0.03, 10-06-26

    Warning: Spoilers inside!

    Download
     
  2. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,051
    Location:
    Germany
    Country:
    Germany
    nice [​IMG]

    some bash tips for lists that supports words with blanks and special chars:
    CODE# define an empty list
    list=()

    # define a noneÂÂempty list
    list=(word-1 "word 2" "$word3"ÂÂ"${more_words[@]}")
    # or
    list=(
    ÂÂ word-1
    ÂÂ"word 2"
    ÂÂ"$word3"ÂÂ
    ÂÂ"${more_words[@]}"
    )

    # add an word that may include spaces into a list
    list=("${list[@]}" "new word")

    # use a list as parameter without in-word breaking
    # importand: is list contains no words it expands to nothing and not to an empty parameter
    wit --options "${list[@]}"

    # concatenate the list into one word
    word="${list[*]}"

    # select each word in a loop
    list=(a "b c " d)
    for (( i=0; i
     
  3. DynomiteGopher
    OP

    Newcomer DynomiteGopher Newbie

    Joined:
    Jun 16, 2010
    Messages:
    5
    Country:
    Canada
    Thanks for the advice. I implemented arrays into the script and cleaned it up, the download link should be updated. Any more tips would be greatly appreciated.
     
  4. DynomiteGopher
    OP

    Newcomer DynomiteGopher Newbie

    Joined:
    Jun 16, 2010
    Messages:
    5
    Country:
    Canada
    New revision released, first post updated. Hopefully somebody finds it useful!
     
  5. unused_bagels

    Newcomer unused_bagels Newbie

    Joined:
    Dec 4, 2008
    Messages:
    9
    Location:
    SC
    Country:
    United States
    I'm running Ubuntu 10, and call me stupid, but I have no idea how to install or run this script. Scripty things have always eluded me. Can someone give me a brief tutorial?
     
  6. Polada

    Newcomer Polada Member

    Joined:
    May 15, 2009
    Messages:
    20
    Country:
    United States
    Right click on the file -- > properties.

    Select the tab permissions ---> check allow executing file as a program

    [​IMG]

    then double click in the file
     
  7. Rydian

    Member Rydian Resident Furvert™

    Joined:
    Feb 4, 2010
    Messages:
    27,883
    Location:
    Cave Entrance, Watching Cyan Write Letters
    Country:
    United States
  8. DynomiteGopher
    OP

    Newcomer DynomiteGopher Newbie

    Joined:
    Jun 16, 2010
    Messages:
    5
    Country:
    Canada
    Hope that works, feel free to ask if you have any more troubles.
     
  9. Arm the Homeless

    Member Arm the Homeless Custom Title

    Joined:
    May 26, 2008
    Messages:
    1,762
    Location:
    /home/andy/
    Country:
    United States
    Looks like pretty nice code.

    And it even uses case statements. I usually yell at 99% of developers for not using them when they should.
     
  10. Wiimm

    Member Wiimm Developer

    Joined:
    Aug 11, 2009
    Messages:
    2,051
    Location:
    Germany
    Country:
    Germany
    Some comments:

    You have forgotten *.wbi (same as *.ciso, used by some managers)

    I have found "cat
     
  11. DynomiteGopher
    OP

    Newcomer DynomiteGopher Newbie

    Joined:
    Jun 16, 2010
    Messages:
    5
    Country:
    Canada
     

Share This Page