Sync-wbfs script

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

  1. DynomiteGopher
    OP

    DynomiteGopher Newbie

    Newcomer
    5
    0
    Jun 16, 2010
    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

    Wiimm Developer

    Member
    2,159
    368
    Aug 11, 2009
    Gambia, The
    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

    DynomiteGopher Newbie

    Newcomer
    5
    0
    Jun 16, 2010
    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

    DynomiteGopher Newbie

    Newcomer
    5
    0
    Jun 16, 2010
    Canada
    New revision released, first post updated. Hopefully somebody finds it useful!
     
  5. unused_bagels

    unused_bagels Newbie

    Newcomer
    9
    0
    Dec 4, 2008
    United States
    SC
    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

    Polada Member

    Newcomer
    20
    0
    May 15, 2009
    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

    Rydian Resident Furvert™

    Member
    27,883
    8,108
    Feb 4, 2010
    United States
    Cave Entrance, Watching Cyan Write Letters
  8. DynomiteGopher
    OP

    DynomiteGopher Newbie

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

    Arm the Homeless Custom Title

    Member
    1,762
    5
    May 26, 2008
    United States
    /home/andy/
    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

    Wiimm Developer

    Member
    2,159
    368
    Aug 11, 2009
    Gambia, The
    Germany
    Some comments:

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

    I have found "cat
     
  11. DynomiteGopher
    OP

    DynomiteGopher Newbie

    Newcomer
    5
    0
    Jun 16, 2010
    Canada