views:

61

answers:

2

I'm writing a bash script to sync my iTunes music directory to a directory on a removable hard drive. The script works fine when there is absolutely nothing in the folder on the external hard drive. Once all files have been copied to the external drive, then the script begins to act strange. Even though i just sync'd everything over, it proceeds to recopy certain files again. After the initial sync, it chooses the same files to resync each consecutive time the script is executed without any changes being made to the source directory.

#!/bin/bash
# shell script to sync music with gigabeat and/or firewire drive

musicdir="/Users/komidore64/Music/iTunes/iTunes Media/Music"
gigadir="/Volumes/GIGABEAT/music"
# fwdir="/Volumes/"

remove() {
    find "$1" \
        ! \( -name "*.wav" \
        -o -name "*.ogg" \
        -o -name "*.flac" \
        -o -name "*.aac" \
        -o -name "*.mp3" \
        -o -name "*.m4a" \
        -o -name "*.wma" \
        -o -name "*.m4p" \
        -o -name "*.ape" \
        -o -type d \) \
        -exec rm -i {} \;
}


if [ $# == 0 ]; then
    echo "no device argument present"
    echo "specify '-g' for gigabeat"
    echo "or '-f' for firewire drive"
else
    remove "$musicdir"
    while [ $1 ]; do
        case $1 in
            -g | --gigabeat )   rsync --archive --verbose --delete "$musicdir/" "$gigadir"
                                ;;
            -f | --firewire )   rsync --archive --verbose --delete "$musicdir/" "$fwdir"
        esac
        shift
    done
    echo "music synced"
fi

It works correctly on the initial sync, but executions afterwards result in a list of some songs and folders being copied again that were just copied over. The exact same files are copied each time after. It should not move any files immediately after a sync correct?

This is the output from the second sync:

building file list ... done
./
12 Stones/
12 Stones/12 Stones/
12 Stones/Potter's Field/
311/
311/From Chaos/
3OH!3/
3OH!3/Want/
3OH!3/Want/03 Don't Trust Me.mp3
3OH!3/Want/04 ChokeChain.mp3
3OH!3/Want/05 I'm Not Your Boyfriend Baby.mp3
3OH!3/Want/07 Starstrukk.mp3
3OH!3/Want/08 Rich Man.mp3
3OH!3/Want/09 Photofinnish.mp3
3OH!3/Want/12 Colorado Sunrise.mp3
A New Found Glory/
A New Found Glory/Catalyst/
A New Found Glory/Catalyst/03 This Disaster.mp3
A New Found Glory/Catalyst/04 Truth Of My Youth.mp3
A New Found Glory/Catalyst/05 I Don't Wanna Know.mp3
A New Found Glory/Catalyst/08 Failure's Not Flattering.mp3
A New Found Glory/Catalyst/09 Over The Head, Below The Knees.mp3
A New Found Glory/Catalyst/10 Ending In Tragedy.mp3
A New Found Glory/Catalyst/14 Who Am I_.mp3
A Wilhelm Scream/
A Wilhelm Scream/Mute Print/
AC_DC/
AC_DC/Back In Black/
Alexisonfire/
Alexisonfire/Crisis/
Alexisonfire/Crisis/02 This Could Be Anywhere in the World.mp3
Alexisonfire/Crisis/03 Mailbox Arson.mp3
Alexisonfire/Crisis/04 Boiled Frogs.mp3
Alexisonfire/Crisis/05 We Are the Sound.mp3
Alexisonfire/Crisis/06 You Burn First.mp3
Alexisonfire/Crisis/07 We Are the End.mp3
All That Remains/
All That Remains/The Fall Of Ideals/
Ambassador/
Ambassador/The Chop Chop From Milk To Meat/
Ambassador/The Chop Chop From Milk To Meat/01 The Opener.mp3
Ambassador/The Chop Chop From Milk To Meat/02 The Chop Chop.mp3
Ambassador/The Chop Chop From Milk To Meat/04 The Chop Chop Defined (Interlude) (ft. LeCrae & Trip Lee).mp3
Ambassador/The Chop Chop From Milk To Meat/05 Gimme Dat!.mp3
Ambassador/The Chop Chop From Milk To Meat/06 Jesus.mp3
Ambassador/The Chop Chop From Milk To Meat/08 Listen Up (ft. Da' T.R.U.T.H.).mp3
Ambassador/The Chop Chop From Milk To Meat/09 Hardcore.mp3
Ambassador/The Chop Chop From Milk To Meat/10 Hope Man.mp3
Ambassador/The Chop Chop From Milk To Meat/11 Theology Of Brokenness (Interlude).mp3
Ambassador/The Chop Chop From Milk To Meat/12 The Cost.mp3
Ambassador/The Chop Chop From Milk To Meat/13 The Day I Met U.mp3
Ambassador/The Chop Chop From Milk To Meat/15 Whatchu Goin' Do_.mp3
Ambassador/The Chop Chop From Milk To Meat/16 The Ambassador's Appeal (Interlude).mp3
Anberlin/
Anberlin/Cities/
Anberlin/Cities/01 (DeÃÅbut).m4a
Anberlin/Cities/02 Godspeed.m4a
Anberlin/Cities/07 Hello Alone.m4a
Anberlin/Cities/08 Alexithymia.m4a
Anberlin/Cities/12 (_Fin).m4a
Anberlin/Never Take Friendship Personal/
Anberlin/Never Take Friendship Personal/03 Stationary.m4a
Anberlin/Never Take Friendship Personal/05 A Day Late.m4a
Anberlin/Never Take Friendship Personal/09 Audrey, Start the Revolution.m4a
Anberlin/Never Take Friendship Personal/10 A Heavy Hearted Work of Staggering Genius.m4a
Anberlin/Never Take Friendship Personal/11 Dance, Dance Christa Paffgen.m4a
Andrew John Hardwick/
Andrew John Hardwick/Silent CD/
Andrew John Hardwick/Silent CD/Silence 32 s.mp3
Antoine Dufour/
Antoine Dufour/Development/
Antoine Dufour/Development/01 Development.mp3
Antoine Dufour/Development/04 MeÃÅlancolie du Changement.mp3
Antoine Dufour/Development/05 Edge of Light.mp3
Antoine Dufour/Development/06 Passage.mp3
Antoine Dufour/Development/08 Wapus.mp3
Antoine Dufour/Development/09 Inspirations.mp3
Antoine Dufour/Development/10 Funky Tonk Guitar Trio.mp3
Armin van Buuren/
Armin van Buuren/10 Years/
Armin van Buuren/10 Years/1-02 Sail.m4a
Armin van Buuren/10 Years/1-07 4 Elements.m4a
Armin van Buuren/10 Years/1-08 Sound of Goodbye (Dark Matter Remix).m4a
Armin van Buuren/10 Years/1-10 Blue Fear.m4a
Armin van Buuren/10 Years/2-01 Who Is Watching_ (Tonedepth Remix).m4a
Armin van Buuren/10 Years/2-03 Zocalo.m4a
Armin van Buuren/10 Years/2-04 This World Is Watching Me.m4a
Armin van Buuren/10 Years/2-05 Sunspot.m4a
Armin van Buuren/10 Years/2-09 Wall of Sound (Airbase Presents Parc Mix).m4a
Armin van Buuren/10 Years/2-10 Intruder.m4a
As I Lay Dying/
As I Lay Dying/An Ocean Between Us/
As I Lay Dying/Shadows Are Security/
As I Lay Dying/Shadows Are Security/06 Reflection.m4a
As I Lay Dying/Shadows Are Security/07 Repeating Yesterday.m4a
As I Lay Dying/Shadows Are Security/08 Through Struggle.m4a
As I Lay Dying/Shadows Are Security/09 The Truth of My Perception.m4a
As I Lay Dying/Shadows Are Security/10 Control Is Dead.m4a
As I Lay Dying/Shadows Are Security/11 Morning Waits.m4a
As I Lay Dying/Shadows Are Security/12 Illusions.m4a
Audio Adrenaline/
Audio Adrenaline/Lift/
Autopilot Off/
Autopilot Off/Autopilot Off [EP]/
Autopilot Off/Make A Sound/
Basshunter/
Basshunter/LOL (International Edition)/
Basshunter/LOL/
Basshunter/Unknown Album/
Born Of Osiris/
Born Of Osiris/The New Reign/
Born Of Osiris/The New Reign/02 Empires Erased.mp3
Born Of Osiris/The New Reign/03 Open Arms To Damnation.mp3
Born Of Osiris/The New Reign/04 Abstract Art.mp3
Born Of Osiris/The New Reign/08 The Takeover.mp3
Boxcar Racer/
Boxcar Racer/Box Car Racer/
Breaking Benjamin/
Breaking Benjamin/We Are Not Alone/
Building 429/
Building 429/Rise/
Building 429/Space In Between Us(Expanded Edition)/
Bullet for My Valentine/
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/02 Eye of the Storm.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/05 Disappear.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/06 Deliver Us From Evil.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/08 Say Goodnight.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/09 End of Days.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/12 Road to Nowhere.mp3
Bullet for My Valentine/Scream Aim Fire Deluxe Edition/13 Watching Us Die Tonight.mp3
Bullet for My Valentine/The Poison/
Burt Mitchell/
Burt Mitchell/Pipes Alive/
Burt Mitchell/Pipes Alive/08 Some Great 6_8s - Lady Dorothea Stewart Chrisholm; Kirkwall Bay; MacNeil of Ugadale.mp3
Burt Mitchell/Pipes Alive/09 G.S. McLennen Set - Kilworth Hills; Muir of Ord; Mrs. Macpherson of Inveran.mp3
Burt Mitchell/Pipes Alive/10 Dance Tunes - Highland Cradle Song; Saffron Kilt; Royal Scots Polka; Queen Victoria's Diamond Jubilee; Bobby Cuthbertson; Crossing the Minch.mp3
Burt Mitchell/Pipes Alive/11 The MSR - Donald Cameron; Athole Cummers; The Smith of Chillchassie.mp3
Burt Mitchell/Pipes Alive/12 The Finale - Carles with the Breeks; Devil in the Kitchen; Jimmy Blue; Duncan Johnstone; Donald Cameron's Powder Horn; Sandy Thompson; The Snuff Wife; Patti.mp3
Codemasters/
Codemasters/GRID Soundtrack/
Codemasters/GRID Soundtrack/01 Atomsplitter.mp3
Codemasters/GRID Soundtrack/03 Bladehead.mp3
Codemasters/GRID Soundtrack/04 Bladehead Reloaded.mp3
Codemasters/GRID Soundtrack/05 Burnbaby.mp3
Codemasters/GRID Soundtrack/06 Burnbaby Reloaded.mp3
Codemasters/GRID Soundtrack/11 Razors Edge.mp3
Codemasters/GRID Soundtrack/14 Vroom Reloaded.mp3
Codemasters/GRID Soundtrack/15 XLR8.mp3
Coldplay/
Coldplay/Viva La Vida Or Death And All His Friends/
Coldplay/Viva La Vida Or Death And All His Friends/01 Life In Technicolor.m4a
Coldplay/Viva La Vida Or Death And All His Friends/02 Cemeteries Of London.m4a
Coldplay/Viva La Vida Or Death And All His Friends/03 Lost!.m4a
Coldplay/Viva La Vida Or Death And All His Friends/06 Yes.m4a
Coldplay/Viva La Vida Or Death And All His Friends/07 Viva La Vida.m4a
Coldplay/Viva La Vida Or Death And All His Friends/08 Violet Hill.m4a
Compilations/
Compilations/2003 World Pipe Band Championships (Volume One)/
Compilations/2005 World Pipe Band Championships (Volume One)/
Compilations/A Walk To Remember/
Compilations/Avatar - Music From The Motion Picture/
Compilations/Avatar - Music From The Motion Picture/01 _You don't dream in cryo. ...._.mp3
Compilations/Avatar - Music From The Motion Picture/04 The bioluminescence of the night.mp3
Compilations/Avatar - Music From The Motion Picture/07 Jake's first flight.mp3
Compilations/Avatar - Music From The Motion Picture/08 Scorched earth.mp3
Compilations/Avatar - Music From The Motion Picture/10 The destruction of Hometree.mp3
Compilations/Avatar - Music From The Motion Picture/11 Shutting down Grace's lab.mp3
Compilations/Avatar - Music From The Motion Picture/12 Gathering all the Na'vi clans for battle.mp3
Compilations/Avatar - Music From The Motion Picture/13 War.mp3
Compilations/Avatar - Music From The Motion Picture/14 I See You (Theme From Avatar).mp3
Compilations/Be A Man/
Compilations/Be A Man/09 Be A Man.mp3
Compilations/Daughtry/
Compilations/Halo_ The Soundtrack/
Compilations/Halo_ The Soundtrack/11 What Once Was Lost.mp3
Compilations/Halo_ The Soundtrack/12 Lament For Pvt. Jenkins.mp3
Compilations/Halo_ The Soundtrack/13 Devils... Monsters....mp3
Compilations/Halo_ The Soundtrack/14 Covenant Dance.mp3
Compilations/Halo_ The Soundtrack/15 Alien Corridors.mp3
Compilations/Halo_ The Soundtrack/16 Rock Anthem For Saving The World.mp3
Compilations/Halo_ The Soundtrack/17 The Maw.mp3
Compilations/Halo_ The Soundtrack/18 Drumrun.mp3
Compilations/Halo_ The Soundtrack/19 On A Pale Horse.mp3
Compilations/Halo_ The Soundtrack/20 Perchance To Dream.mp3
Compilations/Halo_ The Soundtrack/21 Library Suite.mp3
Compilations/Halo_ The Soundtrack/22 The Long Run.mp3
Compilations/Halo_ The Soundtrack/23 Suite Autumn.mp3
Compilations/Halo_ The Soundtrack/24 Shadows.mp3
Compilations/Halo_ The Soundtrack/25 Dust And Echoes.mp3
Compilations/Halo_ The Soundtrack/26 Halo.mp3
Compilations/Iron Man/
Compilations/Iron Man/01 Driving With The Top Down.mp3
Compilations/Iron Man/02 Iron Man (2008 Version).mp3
Compilations/Iron Man/03 Merchant Of Death.mp3
Compilations/Iron Man/04 Trinkets To Kill A Prince.mp3
Compilations/Iron Man/05 Mark I.mp3
Compilations/Iron Man/06 Fireman.mp3
Compilations/Iron Man/07 Vacation's Over.mp3
Compilations/Iron Man/08 Golden Egg.mp3
Compilations/Iron Man/10 Mark II.mp3
Compilations/Iron Man/11 Extra Dry, Extra Olives.mp3
Compilations/Iron Man/12 Iron Man.mp3
Compilations/Iron Man/13 Gulmira.mp3
Compilations/Iron Man/14 Are Those Bullet Holes_.mp3
Compilations/Iron Man/15 Section 16.mp3
Compilations/Iron Man/16 Iron Monger.mp3
Compilations/Iron Man/17 Arc Reaktor.mp3
Compilations/Iron Man/19 Iron Man.mp3
Compilations/Mortal Kombat Annihilation/
Compilations/Mortal Kombat Annihilation/17 Death Is The Only Way Out.mp3
Compilations/Mortal Kombat Annihilation/18 X-Squad(Original Motion Picture Score).mp3
Compilations/Ninja Gaiden Original Soundtrack/
Compilations/Ninja Gaiden Original Soundtrack/1-15 Rachel.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-16 Sudden Threat.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-17 The Fiend.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-18 Pray to God.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-19 Crypt.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-20 Revival of the Dead.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-21 Dinosaur.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-22 Take it Easy.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-23 Forsaken Humanity.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-24 Under Alert.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-25 Monastery Destroyed.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-26 Iron and Sword.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-27 Warehouse.mp3
Compilations/Ninja Gaiden Original Soundtrack/1-28 Village (Bonus Track).mp3
Compilations/Ninja Gaiden Original Soundtrack/2-29 Supply Base.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-30 Escape from Crisis.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-31 Aquaduct.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-32 Toxic Waste.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-33 Moat of Zarkhan.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-34 Distorted World.mp3
Compilations/Ninja Gaiden Original Soundtrack/2-35 Freeze Up.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-01 20th Century Fox Fanfare.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-02 Star Wars Main Title.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-03 Boarding The Federation Battleship.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-04 Death Warrant For Qui-Gon And Obi-Wan.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-05 Fighting The Destroyer Droids.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-06 Queen Amidala Warns The Federation.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-07 The Droid Invasion.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-08 Swimming To Otoh Gunga.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-09 Inside The Bubble City.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-10 Attack Of The Giant Fish.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-11 Darth Sidious.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-12 The Giant Squid And The Attack On Theed.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-13 Qui-Gon And Obi-Wan Rescue The Queen.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-14 Fighting The Guards.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-15 Escape From Naboo.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-16 Enter Darth Maul.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-17 The Arrival Of Tatooine.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-18 Street Band Of Mos Espa.mp3
Compilations/Star Wars Episode I_ The Phantom Menace [The Ultimate Edition]/1-19 Padme Meets Anakin.mp3
Compilations/Twilight/
Compilations/Twilight/01 Supermassive Black Hole.m4a
Compilations/Twilight/03 Full Moon.m4a
Compilations/Twilight/04 Leave Out All The Rest.m4a
Compilations/Twilight/07 Tremble For My Beloved.m4a
Compilations/Twilight/10 Never Think.m4a
Compilations/Ultra.Trance 09/
Compilations/Ultra.Trance 09/02 Come Fly Away (Soha & Adam K Remix).mp3
Compilations/Ultra.Trance 09/04 No Limit (Darude Mix) (feat. Cari Golden).mp3
Compilations/Ultra.Trance 09/06 What A Wonderful World (EDX's Miami Sunset Remix) (feat. Ron Carroll).mp3
Compilations/Ultra.Trance 09/11 Forever (Extended Mix).mp3
Compilations/Ultra.Trance 09/13 Everytime We Touch (Inpetto Remix).mp3
Compilations/Ultra.Trance 09/15 Addicted (Full Club Remix) (feat. Hadley).mp3
Compilations/Ultra.Trance 09/16 Don't Belong (Original) (feat. Leah).mp3
Compilations/Ultra.Trance 09/18 Imagination (TieÃàsto Remix).mp3
Compilations/Ultra.Trance 09/20 Out & There (Dim Chris Remix) (feat. Basto!).mp3
Compilations/Ultra.Trance 09/22 Change The World (Vocal Extended).mp3
Compilations/Ultra.Trance 09/23 Cafe Del Mar (Deadmau5 Remix).mp3
Creed/
Creed/Human Clay/
Creed/Human Clay/01 Are You Ready_.mp3
Creed/Human Clay/02 What If.mp3
Creed/Human Clay/04 Say I.mp3
Creed/Human Clay/05 Wrong Way.mp3
Creed/Human Clay/06 Faceless Man.mp3
Creed/Human Clay/09 Higher.mp3
Creed/Human Clay/10 Wash Away Those Years.mp3
Creed/Human Clay/11 Inside Us All.mp3
Creed/My Own Prison/
Creed/My Own Prison/01 Torn.mp3
Creed/My Own Prison/04 Pity for a Dime.mp3
Creed/My Own Prison/05 In America.mp3
Creed/My Own Prison/06 Illusion.mp3
Creed/My Own Prison/07 Unforgiven.mp3
Creed/Weathered/
Creed/Weathered/02 Freedom Fighter.mp3
Creed/Weathered/03 Who's Got My Back_.mp3
Creed/Weathered/04 Signs.mp3
Creed/Weathered/06 My Sacrifice.mp3
Creed/Weathered/07 Stand Here With Me.mp3
Creed/Weathered/11 Lullaby.mp3
Da' T.R.U.T.H_/
Da' T.R.U.T.H_/The Big Picture/
Da' T.R.U.T.H_/The Big Picture/01 U Ready_.m4a
Da' T.R.U.T.H_/The Big Picture/04 Tree to Tree (ft. Tye Tribbett).m4a
Da' T.R.U.T.H_/The Big Picture/07 Trumpet Blow (ft. Trip Lee).m4a
Da' T.R.U.T.H_/The Big Picture/08 You Made.m4a
Da' T.R.U.T.H_/The Big Picture/11 Great Wall (ft. Freddy Washington, Jr.).m4a
Da' T.R.U.T.H_/The Big Picture/12 Fantasy (ft. J.R.).m4a
Da' T.R.U.T.H_/The Big Picture/14 That Great Day Remix.m4a
Da' T.R.U.T.H_/The Big Picture/15 How Long (ft. Deluge Band).m4a
Da' T.R.U.T.H_/The Big Picture/17 Suitcase (ft. Jahaziel, Stephen the Levite & Swoope).m4a
Daft Punk/
Daft Punk/Alive 2007/
Daft Punk/Alive 2007/03 Television Rules The Nation _ Crescendolls.mp3
Daft Punk/Alive 2007/05 Around The World _ Harder, Better, Faster, Stronger.mp3
Daft Punk/Alive 2007/08 One More Time _ Aerodynamic.mp3
Daft Punk/Alive 2007/09 Aerodynamic Beats _ Forget About the World_ Gabrielle.mp3
Daft Punk/Alive 2007/11 Da Funk _ Daftendirekt.mp3
Daft Punk/Daft Club/
Daft Punk/Daft Club/02 Aerodynamic (Daft Punk Remix).mp3
Daft Punk/Daft Club/03 Harder Better Faster Stronger (Neptunes Remix).mp3
Daft Punk/Daft Club/04 Face To Face (Cosmo Vitelli Remix).mp3
Daft Punk/Daft Club/06 Digital Love (Boris Dlugosh Remix).mp3
Daft Punk/Daft Club/07 Harder Better Faster Stronger (Jess & Crabbe Remix).mp3
Daft Punk/Daft Club/08 Face To Face (Demon Remix).mp3
Daft Punk/Daft Club/12 Aerodynamite.mp3
Daft Punk/Daft Club/13 One More Time (Romanthony's Unplugged).mp3
Daft Punk/Daft Club/14 Something About Us (Love Theme From Interstella 5555).mp3
Daft Punk/Discovery/
Daft Punk/Discovery/01 One More Time.mp3
Daft Punk/Discovery/02 Aerodynamic.mp3
Daft Punk/Discovery/04 Harder Better Faster Stronger.mp3
Daft Punk/Discovery/05 Crescendolls.mp3
Daft Punk/Discovery/08 High Life.mp3
Daft Punk/Discovery/09 Something About Us.mp3
Daft Punk/Discovery/12 Short Circuit.mp3
Daft Punk/Discovery/14 Too Long.mp3
Daft Punk/Homework/
Daft Punk/Homework/01 Daftendirekt.mp3
Daft Punk/Homework/03 Revolution 909.mp3
Daft Punk/Homework/05 Phoenix.mp3
Daft Punk/Homework/07 Around the World.mp3
Daft Punk/Homework/09 Teachers.mp3
Daft Punk/Homework/11 Rock'n Roll.mp3
Daft Punk/Homework/13 Burnin'.mp3
Daft Punk/Homework/15 Alive.mp3
Daft Punk/Homework/16 Funk Ad.mp3
Daft Punk/Human After All/
Daft Punk/Human After All/02 the prime time of your life.mp3
Daft Punk/Human After All/04 steam machine.mp3
Daft Punk/Human After All/08 television rules the nation.mp3
Daft Punk/Human After All/09 technologic.mp3
Daft Punk/Unknown Album/
Daft Punk/Unknown Album/Harder, Better, Faster, Stronger (Punkrose remix).mp3
Dan Erickson/
Dan Erickson/Unknown Album/
Dan Erickson/Unknown Album/The Oxygen.mp3
Dark New Day/
Dark New Day/Twelve Year Silence/
Demi Lovato/
Demi Lovato/Here We Go Again/
Demi Lovato/Here We Go Again/04 Falling Over Me.mp3
Demi Lovato/Here We Go Again/07 Every Time You Lie.mp3
Demi Lovato/Here We Go Again/08 Got Dynamite.mp3
Demi Lovato/Here We Go Again/12 Everything You're Not.mp3
Demi Lovato/Here We Go Again/13 Gift Of A Friend.mp3
Dennis Martin/
Dennis Martin/Legend of Dragoon Original Soundtrack/
Dennis Martin/Legend of Dragoon Original Soundtrack/27 Death Scenes.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/28 World Map Disc 3.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/29 Forest 2.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/30 Despair.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/31 Dennigard.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/32 Ancient Story.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/33 Boss.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/34 Crystal Palace.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/35 Wingly City.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/36 Kashua Glacier.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/37 Zeigg's Theme.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/38 Major Boss.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/39 World Map Disc 4.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/40 Tropical City.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/41 Rose's Theme.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/42 Minetos.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/43 Moon.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/44 Lavitz's Theme.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/45 Forbidden Land.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/46 Melbu Frama.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/47 Generation 1.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/48 Generation 2.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/49 Final Generation.mp3
Dennis Martin/Legend of Dragoon Original Soundtrack/50 Ending Theme.mp3
Dhamaal SF/
Dhamaal SF/Transitions EP/
Disciple/
Disciple/Scars Remain/
Disturbed/
Disturbed/Indestructible/
Disturbed/Indestructible/01 Indestructible.m4a
Disturbed/Indestructible/02 Inside the Fire.m4a
Disturbed/Indestructible/03 Deceiver.m4a
Disturbed/Indestructible/07 Enough.m4a
Disturbed/Indestructible/08 The Curse.m4a
Disturbed/Indestructible/09 Torn.m4a
Disturbed/Indestructible/12 FacÃßade.m4a
Disturbed/Ten Thousand Fists/
Disturbed/The Sickness/
Dropkick Murphys/
Dropkick Murphys/Do Or Die/
Dropkick Murphys/Sing Loud, Sing Proud!/
Drowning Pool/
Drowning Pool/Sinner/
Eiffel 65/
Eiffel 65/Europop/
Eiffel 65/Europop/01 Blue (Da Ba Dee).mp3
Eiffel 65/Europop/02 Too Much Of Heaven.mp3
Eiffel 65/Europop/03 Dub In Life.mp3
Eiffel 65/Europop/04 Living In A Bubble.mp3
Eiffel 65/Europop/08 Another Race.mp3
Eiffel 65/Europop/09 The Edge.mp3
Eiffel 65/Europop/10 Now Is Forever.mp3
Eiffel 65/Europop/11 Silicon World.mp3
Eiffel 65/Europop/12 Europop.mp3
Eiffel 65/Europop/13 Hyperlink (Deep Down).mp3
Enter The Haggis/
Enter The Haggis/Casualties Of Retail/
Eve 6/
Eve 6/Horrorscope/
Everyday Sunday/
Everyday Sunday/Wake Up! Wake Up!/
Everyday Sunday/Wake Up! Wake Up!/04 Find Me Tonight.m4a
Everyday Sunday/Wake Up! Wake Up!/05 Apathy For Apologies.m4a
Everyday Sunday/Wake Up! Wake Up!/06 I'll Get Over It (Miss Elaineous).m4a
Everyday Sunday/Wake Up! Wake Up!/07 What We're Here For.m4a
Everyday Sunday/Wake Up! Wake Up!/10 From Me To You.m4a
Fall Out Boy/
Fall Out Boy/Take This To Your Grave/
Falling Up/
Falling Up/Crashings/
Falling Up/Dawn Escapes/
Ferry Corsten/
Ferry Corsten/Right of Way/
Filter/
Filter/Anthems For The Damned/
Filter/Anthems For The Damned/01 Soldiers Of Misfortune.m4a
Filter/Anthems For The Damned/05 Hatred Is Contagious.m4a
Filter/Anthems For The Damned/06 Lie After Lie.m4a
Filter/Anthems For The Damned/07 Kill The Day.m4a
Filter/Anthems For The Damned/11 Only You.m4a
Filter/Anthems For The Damned/12 Can Stop This.m4a
Filter/Title of Record/
Filter/Title of Record/03 Captain Bligh.mp3
Filter/Title of Record/06 Take A Picture.mp3
Filter/Title of Record/09 Cancer.mp3
Five Finger Death Punch/
Five Finger Death Punch/War Is The Answer/
Five Finger Death Punch/War Is The Answer/02 Hard To See.mp3
Five Finger Death Punch/War Is The Answer/03 Bulletproof.mp3
Five Finger Death Punch/War Is The Answer/05 Crossing Over.mp3
Five Finger Death Punch/War Is The Answer/06 Burn It Down.mp3
Five Finger Death Punch/War Is The Answer/08 Falling In Hate.mp3
Five Finger Death Punch/War Is The Answer/09 My Own Hell.mp3
Five Finger Death Punch/War Is The Answer/11 Canto 34.mp3
Flatfoot 56/
Flatfoot 56/Knuckles Up/
Flogging Molly/
Flogging Molly/Swagger/
Foo Fighters/
Foo Fighters/There Is Nothing Left to Lose/
Foo Fighters/There Is Nothing Left to Lose/03 Learn to Fly.mp3
Foo Fighters/There Is Nothing Left to Lose/04 Gimme Stitches.mp3
Foo Fighters/There Is Nothing Left to Lose/07 Live-In Skin.mp3
Foo Fighters/There Is Nothing Left to Lose/08 Next Year.mp3
Foo Fighters/There Is Nothing Left to Lose/10 Ain't It the Life.mp3
Hans Zimmer/
Hans Zimmer/The Last Samurai/
Haste The Day/
Haste The Day/Pressure The Hinges/
Haste The Day/Pressure The Hinges/01 Eye Of The Needle.m4a
Haste The Day/Pressure The Hinges/02 Pressure The Hinges.m4a
Haste The Day/Pressure The Hinges/07 Janet's Planet.m4a
Haste The Day/Pressure The Hinges/08 Servant Ties.m4a
Haste The Day/Pressure The Hinges/13 Chorus Of Angels.m4a
Haste The Day/Pressure The Hinges/14 In Memory.m4a
Haste The Day/Pressure The Hinges/15 Sea Of Apathy (Demo).m4a
Hoobastank/
Hoobastank/The Reason/
Imogen Heap/
Imogen Heap/Speak for Yourself/
Imogen Heap/Speak for Yourself/02 Goodnight and Go.m4a
Imogen Heap/Speak for Yourself/04 Loose Ends.m4a
Imogen Heap/Speak for Yourself/05 Hide and Seek.m4a
Imogen Heap/Speak for Yourself/09 Just for Now.m4a
Imogen Heap/Speak for Yourself/10 I Am In Love With You.m4a
J.R_/
J.R_/Life By Stereo/
J.R_/Life By Stereo/01 Intro.mp3
J.R_/Life By Stereo/02 Rock Star (featuring FLAME).mp3
J.R_/Life By Stereo/05 Ridaz (featuring Da' T.R.U.T.H., Trip Lee & Iz-Real).mp3
J.R_/Life By Stereo/06 OK.mp3
J.R_/Life By Stereo/09 We Need You.mp3
J.R_/Life By Stereo/13 Say Yeah.mp3
J.R_/Life By Stereo/14 Your Word.mp3
J.R_/Life By Stereo/17 Never Lose.mp3
J.R_/Metamorphosis/
J.R_/Metamorphosis/01 Intro.mp3
J.R_/Metamorphosis/04 Superstar.mp3
J.R_/Metamorphosis/05 Amazing.mp3
J.R_/Metamorphosis/07 Temptations (featuring Thi'sl).mp3
J.R_/Metamorphosis/08 Smile.mp3
J.R_/Metamorphosis/10 Shine Your Light (featuring Tia and Keran).mp3
J.R_/Metamorphosis/11 Sorry Child.mp3
J.R_/Metamorphosis/15 The Greatest (featuring Flame) + [Bonus Track] High.mp3
Jack Johnson/
Jack
A: 

I'm not sure if this is the problem, but in general you want to make sure you have a trailing / on paths passed to rsync, e.g.

rsync --archive --verbose --delete "$musicdir/" "$gigadir"

should be:

rsync --archive --verbose --delete "$musicdir/" "$gigadir/"

Paul R
A trailing / matters only for the source.
mkj
A: 

The line that sets fwdir is commented out and the corresponding line in the case statement is missing the ;;.

Dennis Williamson
i left fwdir out currently because I want to get my gigabeat syncing to work first then i'll implement the firewire drive.
komidore64