This is a simple bash script that I wrote to handle syncing the Lucid daily builds to my local system.  It's a little more specific than the regular mirror scripts as it only updates/tracks individual ISOs.  I didn't need to mirror the complete cdimages.ubuntu.com site, so this is the product of necessity. <<MailTo(jeffrey AT ubuntu DOT com)>>

=== Before You Begin ===
It depends on a few things being set up properly before it will work though.

 1. Set up directory structure like this:
    /home/username/isos
    /home/username/isos/lucid
    /home/username/isos/lucid/kubuntu  #this holds the Kubuntu i386, amd64 and netbook ISOs
    /home/username/isos/lucid/server   #this holds the ubuntu-server ISOs
    /home/username/isos/lucid/ubuntu   #this holds the ubuntu-desktop and ubuntu-netbook ISOs
    /home/username/isos/lucid/xubuntu  #this holds the Xubuntu i386, amd64 and netbook ISOs

    Other versions can be added, but will require some tweaking of the script by adding ISOPATH entries to point
    zsync to the correct place on [[http://cdimages.ubuntu.com]]
 2. zsync needs to be installed.  This depends on zsync, which is faster than rsync as it only pulls down a diff
    of each image and syncs from that.  rsync is slower and pulls down entire ISO images based on non-matching
    MD5SUMs.  
 3. before you can zsync, you need to populate your iso directories with the ISOs you want to keep synced. You 
    can do this using rsync, wget or even a web browser, or possibly the torrents for the ISOs

=== To Use ===
 1. cp /path/to/isosync.sh /home/username/isos
 2. edit isosync.sh and make sure you change the following to match your system:
  a. HOMEDIR -- set to match your home directory
  a. SOMETHING_PATH variables -- add any you need that aren't there (for ARM images or other things)
 3. run like this
   * ./isosync.sh VERSION (where VERSION is the directory you wish to update, e.g. lucid (see above)

You should then see output similar to the following as isosync.sh runs:

{{{
bladernr@klaatu:~/isos$ ./isosync.sh lucid/
Now entering /home/bladernr/isos/lucid//kubuntu
Preparing to zsync Kubuntu images in /home/bladernr/isos/lucid/kubuntu
###################################
Now syncing lucid-desktop-amd64.iso from http://cdimages.ubuntu.com/cdimage/kubuntu/daily-live/current/
zsync complete for lucid-desktop-amd64.iso
###################################
###################################
Now syncing lucid-desktop-i386.iso from http://cdimages.ubuntu.com/cdimage/kubuntu/daily-live/current/
zsync complete for lucid-desktop-i386.iso
###################################
###################################
Now syncing lucid-netbook-i386.iso from http://cdimages.ubuntu.com/cdimage/kubuntu-netbook/daily-live/current
zsync complete for lucid-netbook-i386.iso
###################################
Now entering /home/bladernr/isos/lucid//server
###################################
Now syncing lucid-server-amd64.iso from http://cdimages.ubuntu.com/cdimage/ubuntu-server/daily/current/
zsync complete for lucid-server-amd64.iso
###################################
###################################
Now syncing lucid-server-i386.iso from http://cdimages.ubuntu.com/cdimage/ubuntu-server/daily/current/
zsync complete for lucid-server-i386.iso
###################################
Now entering /home/bladernr/isos/lucid//ubuntu
###################################
Now syncing lucid-desktop-amd64.iso from http://cdimages.ubuntu.com/cdimage/daily-live/current/
zsync complete for lucid-desktop-amd64.iso
###################################
###################################
Now syncing lucid-desktop-i386.iso from http://cdimages.ubuntu.com/cdimage/daily-live/current/
zsync complete for lucid-desktop-i386.iso
###################################
###################################
Now syncing lucid-netbook-i386.iso from http://cdimages.ubuntu.com/cdimage/ubuntu-netbook/daily-live/current/
zsync complete for lucid-netbook-i386.iso
###################################
Now entering /home/bladernr/isos/lucid//xubuntu
###################################
Now syncing lucid-desktop-amd64.iso from http://cdimages.ubuntu.com/cdimage/xubuntu/daily-live/current/
zsync complete for lucid-desktop-amd64.iso
###################################
###################################
Now syncing lucid-desktop-i386.iso from http://cdimages.ubuntu.com/cdimage/xubuntu/daily-live/current/
zsync complete for lucid-desktop-i386.iso
###################################
}}}

=== The script ===
[[http://www.jefflane.org/downloads/isosync.sh|Download isosync.sh Here]]

-- [[LaunchpadHome:bladernr]] <<DateTime(2010-03-11T17:22:36-0500)>>